Reputation: 11
I get the following error: Error(39, 0) Gradle method note found: 'compile()'
the following solutions don't seem to work:
Gradle DSL method not found: 'compile()'
gradle DSL method not found: 'compile()' persisting error
Here is my entire gradle.build file
apply plugin: 'com.android.application'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
allprojects {
repositories {
jcenter()
}
}
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc3"
defaultConfig {
applicationId "com.audacityit.finder"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.squareup.okhttp:okhttp:2.4.0'
apply plugin: 'maven'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.google.android.gms:play-services-ads:7.8.0'
compile 'com.google.android.gms:play-services-identity:7.8.0'
compile 'com.google.android.gms:play-services-gcm:7.8.0'
}
Where exactly could I be going wrong?
Upvotes: 0
Views: 200
Reputation: 75788
At first you need to upgrade your compileSdkVersion
version & targetSdkVersion
version .
compileSdkVersion 23
targetSdkVersion 23
Finally
android {
compileSdkVersion 23
buildToolsVersion "23.0.0 rc3"
defaultConfig {
applicationId "com.audacityit.finder"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
Upvotes: 1