美文网首页
Please use 'annotationProces

Please use 'annotationProces

作者: pdog18 | 来源:发表于2017-11-28 09:28 被阅读302次

改用gradle4.1遇到一些问题。

Error:android-apt plugin is incompatible with the Android Gradle plugin.  Please use 'annotationProcessor' configuration instead.

寻找解决方法时遇到有
去掉appbuild.gradle中的apply plugin: ‘android-apt’
apt相关的地方换成annotationProcessor
如 : apt ‘com.jakewharton:butterknife-compiler:8.8.1’ –> annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’

但我项目中没有任何moudleandroid-apt,报错指向但build.gradle文件是其中一个moudle的,如下

apply plugin: 'com.android.library'
apply plugin: 'realm-android'

android {
 //...
}
repositories {
    maven { url "https://jitpack.io" }
    maven { 
        url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
    }
}

dependencies {
   //...
}

排查发现是realm-android中会导致这个报错,推测应该是realm-android中带有apt的部分吧。注释掉就好了。

相关文章

网友评论

      本文标题:Please use 'annotationProces

      本文链接:https://www.haomeiwen.com/subject/dxksbxtx.html