android studio 3.0 di 注入插件引入错误
16lz
2022-03-15
apt插件问题(Error:Cannot choose between the following configurations of project :library:)
报错:
Error:Cannot choose between the following configurations of project :library:
- debugApiElements
- debugRuntimeElements
- releaseApiElements
- releaseRuntimeElements
All of them match the consumer attributes:
解决
//1.在project的build.gradle中删除classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
//2.在module的build.gradle中删除
apply plugin: 'android-apt'
//3.将module的build.gradle文件中的dependency
apt 'com.jakewharton:butterknife-compiler:8.1.0'
//改为
annotationProcessor 'com.jakewharton:butterknife-compiler:8.1.0'
其他使用apt的依赖,也要这样更改
如果改动不可以,升级gradle版本到4.3 tool 版本升级到3.0.0+
更多相关文章
- Error:(16, 0) Gradle DSL method not found: 'android()'
- AndFire防火墙1.2版本发布
- Android(安卓)访问网络连接设置界面
- app:preDebugAndroidTestBuild
- API 23及之后版本关于用android studio 中LocationManager的方法
- Android创建和删除桌面快捷方式
- Android:setLatestEventInfo问题
- Android(安卓)平台如何获取程序的版本
- Android中 实现输入框搜索,清楚历史记录的功能