android studio 3.0 di 注入插件引入错误
16lz
2021-01-23
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+
更多相关文章
- AndFire防火墙1.2版本发布
- Android 平台如何获取程序的版本
- Android各版本代号
- Android studio 版本升级要到问题
- linux下交叉编译android版本的libSDL2.so
- 修改android项目sdk版本的方法
- 为Eclipse安装插件ADT plugin
- android studio更改兼容android低版本