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+

更多相关文章

  1. Error:(16, 0) Gradle DSL method not found: 'android()'
  2. AndFire防火墙1.2版本发布
  3. Android(安卓)访问网络连接设置界面
  4. app:preDebugAndroidTestBuild
  5. API 23及之后版本关于用android studio 中LocationManager的方法
  6. Android创建和删除桌面快捷方式
  7. Android:setLatestEventInfo问题
  8. Android(安卓)平台如何获取程序的版本
  9. Android中 实现输入框搜索,清楚历史记录的功能

随机推荐

  1. Gallery 画廊
  2. android开发 常用技巧
  3. 【译】Android(安卓)6.0接口变化(三)(Androi
  4. 【Android】Android(安卓)Studio中gradle
  5. 2013.12.23 (2)——— android 代码调用she
  6. Flutter1.12与原生Android交互(kotlin)
  7. android获取手机号码以及imsi信息
  8. android 源码导入到android studio
  9. Android(安卓)通过继承TextView类自定义
  10. android 系统属性 build.prop