syncing Gradle it gives the following error Error:(24, 0) Gradle DSL method not found: 'main()' Possible causes:
"gradle.build"
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
}
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
res.srcDirs = ['res']
jniLibs.srcDirs = ['libs']
}
If you are using version
0.14.0
or higher of the gradle plugin, you should replacerunProguard
withminifyEnabled
in yourbuild.gradle
files.