2017-03-11 64 views
7

因此,我已阅读了本网站上关于此问题的所有问题。我也曾与一位具有类似问题的开发人员进行了交谈,他们能够解决这个问题。Android Studio 2.3更新:警告:使用不兼容的插件进行注释处理:android-apt。这可能会导致意外行为

我没有apt或annotationProcessor写在我的gradle脚本中的任何地方。

我没有在我的代码中的任何地方写的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:[email protected]') { 
     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:[email protected]' 
    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" 
    } 
} 

回答

21

旧版本使用android-apt。你应该升级你的realm-android插件版本。

+0

呜惊人!谢谢 !我检查了所有的依赖关系,而不是类路径库! – legalimpurity

+2

@botteap男人,太棒了,你救了我的傍晚! – Artem

+0

@botteap我得到这个警告与领域的android插件2.1.1,所以我升级到2.2.0,但后来我得到 '错误:Gradle的DSL方法没有找到:'apt()'' 你知道吗有任何解决这个问题的方法吗 ? –

6

更换

classpath "io.realm:realm-gradle-plugin:1.2.0" 

classpath "io.realm:realm-gradle-plugin:3.1.2" 

,然后应用插件

apply plugin: 'realm-android' 
相关问题