更新后 Android SDK 平台工具 24 "Could not find method apt()" 为什么?
After update Android SDK platfrom-tools 24 "Could not find method apt()" why?
更新后Android SDK platform-tools 24出现这个错误:
Could not find method apt() for arguments
[com.jakewharton:butterknife-compiler:8.0.1] on
DefaultExternalModuleDependency{g
roup='com.android.support', name='appcompat-v7', version='24.0.0', configuration='default'}.
顶级 build.gradle :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
项目依赖:
apply plugin: 'com.neenbedankt.android-apt'
def _androidSupport = "24.0.0"
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.0.8@aar'
compile 'com.google.code.gson:gson:2.4'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.google.zxing:core:3.2.1'
compile 'me.dm7.barcodescanner:zxing:1.8.4'
compile 'com.jakewharton:butterknife:8.0.1'
compile 'org.greenrobot:greendao:2.2.0'
compile "com.android.support:support-v4:${_androidSupport}"
compile "com.android.support:recyclerview-v7:${_androidSupport}"
compile "com.android.support:design:24.0.0:${_androidSupport}"
}
您的依赖项块应包括以下两行中的两者:
dependencies {
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
}
更新后Android SDK platform-tools 24出现这个错误:
Could not find method apt() for arguments [com.jakewharton:butterknife-compiler:8.0.1] on DefaultExternalModuleDependency{g roup='com.android.support', name='appcompat-v7', version='24.0.0', configuration='default'}.
顶级 build.gradle :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
项目依赖:
apply plugin: 'com.neenbedankt.android-apt'
def _androidSupport = "24.0.0"
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.0.8@aar'
compile 'com.google.code.gson:gson:2.4'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.google.zxing:core:3.2.1'
compile 'me.dm7.barcodescanner:zxing:1.8.4'
compile 'com.jakewharton:butterknife:8.0.1'
compile 'org.greenrobot:greendao:2.2.0'
compile "com.android.support:support-v4:${_androidSupport}"
compile "com.android.support:recyclerview-v7:${_androidSupport}"
compile "com.android.support:design:24.0.0:${_androidSupport}"
}
您的依赖项块应包括以下两行中的两者:
dependencies {
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
}