Reputation: 31
I am getting error of Gradle Project sync failed. Basic functionality(editing,debugging) will not work properly
Here is the error
Error:(28, 0) Could not find method android() for arguments [build_29zadyxffug4w4nfov6vkui3p$_run_closure3@7ad0dcc3] on root project 'Happybirthday1' of type org.gradle.api.Project.
<a href="openFile:C:\Users\user\AndroidStudioProjects\Happybirthday1\build.gradle">Open File</a>
Upvotes: 0
Views: 107
Reputation: 12044
Try with
android {
compileSdkVersion 17
buildToolsVersion '23.0.0'
}
dependencies {
compile files('app/libs/junit-4.12-JavaDoc.jar')
}
apply plugin: 'maven'
In your build.gradle
and take care, shouldn't be on module/build.gradle
Upvotes: 1
Reputation: 1291
You need to apply Android application plugin at the top of app level Gradle file, like this:
apply plugin: 'com.android.application'
,as this plugin identifies your code as an Android application and configures properties in android block in app level Gradle file for your application
Upvotes: 1