升级studio之后遇到
android error: package *.*.databinding 不存在这样的错误,坑爹的找了两天。
一直以为是哪个布局文件写法有问题,恨不得七八十个页面一个一个的排查。一直忽略了这个黄色警告
Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior.
最后google到了
下面这段话
Your app level gradle dependencies should include (as per butterknife website instructions):
compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
You can remove the line :
apply plugin: 'com.neenbedankt.android-apt'
Annotation Processing became available in Android Gradle plugin (2.2 and later) so there is now no need to use the above plugin anymore if using this version of gradle or greater.
If you'd like to know how to turn annotation processing off and on and AS the setting is in :
Settings > Build, Execution, Deployment > Compiler > Annotation Processors
这样该国之后一切ok。只想说,有时候黄色的警告!我们确实不能忽略啊
本文介绍了如何解决升级Android Studio后出现的包不存在错误,并详细解释了如何调整Gradle配置及禁用不兼容插件来避免此类问题。
1719

被折叠的 条评论
为什么被折叠?



