title: Android Gradle Issue: Caused by: groovy.lang.MissingMethodException: No signature of method
body: <p>My project is not building never. I got the same error all time.</p>
  <p>I tried for a day to some other solutions but I couldn't progress :/</p>
  <p>I searched the solution and I realized that it may be related to maven.</p>
  <p>By the way, my project is old.</p>
  <p>here Is the error message;</p>
  <p><a href="https://i.stack.imgur.com/8RLMl.png" rel="nofollow noreferrer">enter image description here</a></p>
  <pre><code>Caused by: groovy.lang.MissingMethodException: No signature of method: build_1tiyt7a69ra5smonjfai0v39h.android() is applicable for argument types: (build_1tiyt7a69ra5smonjfai0v39h$_run_closure2) values: [build_1tiyt7a69ra5smonjfai0v39h$_run_closure2@2cca4753]
  at build_1tiyt7a69ra5smonjfai0v39h.run
  </code></pre>
  <p>My <strong>build.gradle (app)</strong> file is below.</p>
  <pre><code>buildscript {
      repositories {
          google()
          mavenCentral()
          maven { url &quot;http://dl.bintray.com/journeyapps/maven&quot;; allowInsecureProtocol = true }
      }
  }
  
  repositories {
          google()
          maven { url 'https://maven.fabric.io/public' }
          maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
          maven { url &quot;https://jitpack.io&quot; }
          flatDir { dirs &quot;libs&quot; }
      }
  
  
  android {
  
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  
      packagingOptions {
          exclude 'META-INF/ASL2.0'
          exclude 'META-INF/DEPENDENCIES.txt'
          exclude 'META-INF/LICENSE.txt'
          exclude 'META-INF/NOTICE.txt'
          exclude 'META-INF/NOTICE'
          exclude 'META-INF/LICENSE'
          exclude 'META-INF/DEPENDENCIES'
          exclude 'META-INF/notice.txt'
          exclude 'META-INF/license.txt'
          exclude 'META-INF/dependencies.txt'
          exclude 'META-INF/LGPL2.1'
      }
      defaultConfig {
          applicationId &quot;com.boomset.mobile&quot;
          minSdkVersion 21
          compileSdkVersion 30
          targetSdk 31
          versionCode 60000013
          versionName &quot;6.1.3&quot;
  
          multiDexEnabled true
      }
      dexOptions {
          maxProcessCount 2
          javaMaxHeapSize &quot;4g&quot;
      }
   
      buildTypes {
          debug {
              debuggable true
              buildConfigField(&quot;int&quot;, &quot;PLATFORM&quot;, platform)
              buildConfigField &quot;String&quot;, &quot;API_URL&quot;, &quot;\&quot;${endpoint}\&quot;&quot;
              buildConfigField &quot;String&quot;, &quot;API_URL_PRETEST&quot;, &quot;\&quot;${pretest_endpoint}\&quot;&quot;
              buildConfigField &quot;String&quot;, &quot;API_URL_STAGING&quot;, &quot;\&quot;${staging_endpoint}\&quot;&quot;
              applicationIdSuffix &quot;.debug&quot;
          }
          release {
              buildConfigField(&quot;int&quot;, &quot;PLATFORM&quot;, platform)
              buildConfigField &quot;String&quot;, &quot;API_URL&quot;, &quot;\&quot;${endpoint}\&quot;&quot;
              buildConfigField &quot;String&quot;, &quot;API_URL_PRETEST&quot;, &quot;\&quot;${pretest_endpoint}\&quot;&quot;
              buildConfigField &quot;String&quot;, &quot;API_URL_STAGING&quot;, &quot;\&quot;${staging_endpoint}\&quot;&quot;
              minifyEnabled true
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              //signingConfig signingConfigs.config
          }
  //        lintOptions {
  //            disable 'InvalidPackage'
  //        }
  
          lintOptions {
              checkReleaseBuilds false
              // Or, if you prefer, you can continue to check for errors in release builds,
              // but continue the build even when errors are found:
              abortOnError false
          }
      }
  
  
      configurations {
          all*.exclude module: 'gson'
      }
  
      configurations.all {
          c -&gt; c.resolutionStrategy.dependencySubstitution {
              all { DependencySubstitution dependency -&gt;
                  if (dependency.requested.group == 'org.bouncycastle') {
                      dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.69'
                  }
              }
          }
      }
  
  
      compileOptions {
          targetCompatibility 1.8
          sourceCompatibility 1.8
      }
      buildToolsVersion '29.0.3'
  }
  
  ext {
      supportLibraryVersion = '1.0.0'
      retrofitVersion = '2.4.0'
      okhttp3Version = '3.10.0'
      rxjava2Version = '2.2.1'
      butterKnifeVersion = '10.1.0'
      leakCanary = '1.5.4'
      ormlite = '4.48'
  }
  
  
  dependencies {
  
  //dependencies...
  
  }
  </code></pre>
  <p>Thanks for your helps</p>