改用gradle4.1
遇到一些問題钦幔。
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
尋找解決方法時(shí)遇到有
去掉app
的build.gradle
中的apply plugin: ‘a(chǎn)ndroid-apt’
把apt
相關(guān)的地方換成annotationProcessor
如 : apt ‘com.jakewharton:butterknife-compiler:8.8.1’
–> annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’
但我項(xiàng)目中沒有任何moudle
有 android-apt
搪锣,報(bào)錯(cuò)指向但build.gradle
文件是其中一個(gè)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 {
//...
}
排查發(fā)現(xiàn)是realm-android
中會(huì)導(dǎo)致這個(gè)報(bào)錯(cuò),推測應(yīng)該是realm-android
中帶有apt
的部分吧早龟。注釋掉就好了祝沸。