1
根據this answer和this answer我已經對應用程序gradle進行了更改,但仍然在構建我的應用程序時顯示錯誤。android-apt插件與Android Gradle插件不兼容。請使用'annotationProcessor'配置代替
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
我在這裏錯過了什麼?
這裏是我的應用搖籃
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
//project.ext.versionInfo.releaseVersionName = SYNCED_VERSION_NAME
android {
compileSdkVersion 23
flavorDimensions "default"
defaultConfig {
applicationId "in.something"
minSdkVersion 15
targetSdkVersion 23
versionCode 13
versionName "1.10"
multiDexEnabled true
}
productFlavors {
LIVE_BETA {
applicationIdSuffix ".beta"
resValue "string", "app_display_name", "Something(B)"
resValue "string", "SERVER_URL", "http://something/beta"
}
LIVE {
resValue "string", "app_display_name", "something"
resValue "string", "SERVER_URL", "http://something/live"
}
DEV {
applicationIdSuffix ".dev"
resValue "string", "app_display_name", "something(D)"
resValue "string", "SERVER_URL", "http://localhost/"
}
}
buildTypes {
debug {
// applicationIdSuffix "
// .debug"
// versionNameSuffix "-debug"
}
release {
//minifyEnabled true
//shrinkResources true
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
// Rename APK files
// applicationVariants.all { variant ->
// def output = variant.outputs.get(0)
// File apk = output.outputFile
// String newName = output.outputFile.name.replace(".apk", "-${variant.mergedFlavor.versionCode}-${variant.mergedFlavor.versionName}-.apk")
// .replace("app-", "${variant.mergedFlavor.applicationId}-")
// output.outputFile = new File(apk.parentFile, newName)
// }
}
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
//================== Local ========================/
implementation fileTree(include: ['*.jar'], dir: 'libs')
//compile files('libs/ksoap2-android-assembly-3.1.1-jar-with-dependencies.jar')
/** *************************************************/
//================== Default ========================/
implementation 'com.android.support:appcompat-v7:23.1.0'
implementation 'com.android.support:recyclerview-v7:23.1.0'
implementation 'com.android.support:design:23.1.0'
implementation 'com.android.support:cardview-v7:23.1.0'
/** *************************************************/
implementation 'com.fasterxml.jackson.core:jackson-databind:2.6.3'
implementation 'com.fasterxml.jackson.core:jackson-core:2.6.3'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.6.3'
//implementation files('libs/bouncycastle-java5-136-1.0.0.jar')
implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.1'
/************ Location *****************/
implementation 'com.google.android.gms:play-services-location:8.3.0'
/** *************************************************/
/************ Common *****************/
implementation 'commons-io:commons-io:2.4'
implementation 'commons-codec:commons-codec:1.4'
/** ********************************/
implementation('com.crashlytics.sdk.android:crashlytics:[email protected]') {
transitive = true;
}
implementation files('libs/bouncycastle-java5-136-1.0.0.jar')
}
我使用過Android Studio 3.0和gradle這個版本是3.0