隨著Android Studio 4.1的升級(jí),項(xiàng)目出現(xiàn)了Plugin Error的報(bào)錯(cuò)
例如:
Plugin "GsonFormat" is incompatible(support only in IntelliJ IDEA)
打開(kāi)文件夾“C:\Users\administrator\AppData\Roaming\Google\AndroidStudio4.1\plugins”,這個(gè)文件里面放的是我們安裝的插件,找到報(bào)錯(cuò)的插件,刪除就可以了
打包的時(shí)候,提示Could not get unknown property 'manifestOutputDirectory',發(fā)現(xiàn)只有華為渠道包會(huì)報(bào)這個(gè)錯(cuò)誤,排查后發(fā)現(xiàn)是因?yàn)槭褂昧巳A為推送的原因,把項(xiàng)目級(jí)別的build.gradle中的com.huawei.agconnect:agcp 升級(jí)到最新版本即可
對(duì)于代碼報(bào)錯(cuò)沒(méi)有錯(cuò)誤提示,沒(méi)有高亮的問(wèn)題,是插件GsonFormat和ButterKnife Zelezny導(dǎo)致的,去除即可。GsonFormat插件可以用GsonFormatPlus替代,ButterKnife Zelezny就等下個(gè)版本吧
Resource lDs will be non-final in Android Gradle Plugin version 5.0,這個(gè)問(wèn)題是android studio4.1的bug,等后面發(fā)布修復(fù)版本就好了,我們可以暫時(shí)在module的build.gradle文件中加上
android {
lintOptions {
disable 'NonConstantResourceId'
}
}