Android Studio 2.3 更新:Warning:Using 注释处理的不兼容插件:android-apt。这可能会导致意外行为
Android Studio 2.3 update : Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior
所以,我已经阅读了我可以在本网站上找到的关于此问题的所有问题。我也在评论中与一位遇到类似问题的开发人员进行了交谈,他能够解决这个问题。
我的 gradle 脚本中没有写 apt 或 annotationProcessor。
我的代码中没有写 android-apt 这个词。我什至继续检查了所有的图书馆。那已经包含在我的项目中了。
这是一个非常大的问题,需要解决。
我在下面附上修改后的build.gradle,请建议:
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
dexOptions {
jumboMode = true
}
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.legalimpurity.indiancourts"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
multiDexEnabled true
vectorDrawables.useSupportLibrary = true;
}
buildTypes {
release {
// minifyEnabled true
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
signingConfigs {
}
dataBinding {
enabled = true
}
}
//For Facebook i guess
repositories {
mavenCentral()
maven {
url "https://jitpack.io"
}
maven { url 'https://maven.fabric.io/public' }
}
def var = dependencies {
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-analytics:9.4.0'
compile 'com.google.android.gms:play-services-plus:9.4.0'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.android.gms:play-services-identity:9.4.0'
// compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:design:${rootProject.ext.supportLibVersion}"
compile "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"
compile('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
transitive = true;
}
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.android.support:multidex:1.0.1'
// compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
compile 'com.github.barteksc:android-pdf-viewer:2.4.0'
compile 'com.wdullaer:materialdatetimepicker:3.1.3'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.android.volley:volley:1.0.0'
// compile 'com.facebook.android:facebook-android-sdk:4.6.0'
// compile 'com.satsuware.lib:usefulviews:2.3.6'
compile 'com.hkm:hkmprocessbuttons:1.2.4'
compile 'com.github.thorbenprimke:realm-searchview:0.9.6'
compile 'com.jakewharton:butterknife:8.5.1'
// compile 'com.github.amlcurran.showcaseview:library:5.4.3'
compile 'com.github.deano2390:MaterialShowcaseView:1.1.0'
// compile 'com.zaihuishou:expandablerecycleradapter-databinding:1.0.0'
// compile 'com.squareup.picasso:picasso:2.5.2'
// compile 'com.legalimpurity.expandablerecyclerview:expandable-recyclerview:1.0'
compile project(':agendacalendarview')
compile project(':expandablelibrary')
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.android.support:support-v4:25.+'
}
apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'com.google.gms.google-services'
configurations.all {
resolutionStrategy {
force "com.android.support:support-annotations:25.2.0"
}
}
旧版本的 Realm 使用 android-apt
。您应该升级 realm-android
插件版本。
替换
classpath "io.realm:realm-gradle-plugin:1.2.0"
和
classpath "io.realm:realm-gradle-plugin:3.1.2"
然后应用插件
apply plugin: 'realm-android'
所以,我已经阅读了我可以在本网站上找到的关于此问题的所有问题。我也在评论中与一位遇到类似问题的开发人员进行了交谈,他能够解决这个问题。
我的 gradle 脚本中没有写 apt 或 annotationProcessor。
我的代码中没有写 android-apt 这个词。我什至继续检查了所有的图书馆。那已经包含在我的项目中了。
这是一个非常大的问题,需要解决。
我在下面附上修改后的build.gradle,请建议:
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
dexOptions {
jumboMode = true
}
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.legalimpurity.indiancourts"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
multiDexEnabled true
vectorDrawables.useSupportLibrary = true;
}
buildTypes {
release {
// minifyEnabled true
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
signingConfigs {
}
dataBinding {
enabled = true
}
}
//For Facebook i guess
repositories {
mavenCentral()
maven {
url "https://jitpack.io"
}
maven { url 'https://maven.fabric.io/public' }
}
def var = dependencies {
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-analytics:9.4.0'
compile 'com.google.android.gms:play-services-plus:9.4.0'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.android.gms:play-services-identity:9.4.0'
// compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:design:${rootProject.ext.supportLibVersion}"
compile "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"
compile('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
transitive = true;
}
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.android.support:multidex:1.0.1'
// compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
compile 'com.github.barteksc:android-pdf-viewer:2.4.0'
compile 'com.wdullaer:materialdatetimepicker:3.1.3'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.android.volley:volley:1.0.0'
// compile 'com.facebook.android:facebook-android-sdk:4.6.0'
// compile 'com.satsuware.lib:usefulviews:2.3.6'
compile 'com.hkm:hkmprocessbuttons:1.2.4'
compile 'com.github.thorbenprimke:realm-searchview:0.9.6'
compile 'com.jakewharton:butterknife:8.5.1'
// compile 'com.github.amlcurran.showcaseview:library:5.4.3'
compile 'com.github.deano2390:MaterialShowcaseView:1.1.0'
// compile 'com.zaihuishou:expandablerecycleradapter-databinding:1.0.0'
// compile 'com.squareup.picasso:picasso:2.5.2'
// compile 'com.legalimpurity.expandablerecyclerview:expandable-recyclerview:1.0'
compile project(':agendacalendarview')
compile project(':expandablelibrary')
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.android.support:support-v4:25.+'
}
apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'com.google.gms.google-services'
configurations.all {
resolutionStrategy {
force "com.android.support:support-annotations:25.2.0"
}
}
旧版本的 Realm 使用 android-apt
。您应该升级 realm-android
插件版本。
替换
classpath "io.realm:realm-gradle-plugin:1.2.0"
和
classpath "io.realm:realm-gradle-plugin:3.1.2"
然后应用插件
apply plugin: 'realm-android'