1

Gradle for my project isn't working. I've checked other questions that have had the same problem, but this one is in a newer version and I'm not sure how to solve it. I'm trying to get the Android SDK up and running for the first time, so I'm really new to this. Thorough answers are appreciated.

Here is my Gradle error:

Error:(22, 0) Could not find method android() for arguments [build_3bh8pl96cp64yo421v01fuk9s$_run_closure3@4b7fff2f] on root project 'Meet-upProject' of type org.gradle.api.Project.

And here is my build.gradle in root:

buildscript {
    repositories {
        jcenter()
     }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
     }
 }
 allprojects {
     repositories {
         jcenter()
     }
 }
 task clean(type: Delete) {
     delete rootProject.buildDir
 }

 android {
     compileSdkVersion 25
     buildToolsVersion '25.0.2'
     dexOptions {
         incremental true
     }
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_6
         targetCompatibility JavaVersion.VERSION_1_6
     }
 }
 dependencies {
     compile files('app/libs/junit-4.12-JavaDoc.jar')
 }
  • I guess thanks for the Tumbleweed badge :( *cries* I take it no one else is getting the same errors on their system. This is really weird. I want to blame Windows, but I might be the problem. Someone help! – Josh Petrin Jan 13 '17 at 16:55
  • This question may contain an answer for you:- https://stackoverflow.com/questions/37250493/could-not-find-method-android-for-arguments – Steve Smith Sep 28 '17 at 11:11

0 Answers0