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. AndFire防火墙1.2版本发布
  2. Android 平台如何获取程序的版本
  3. Android各版本代号
  4. Android studio 版本升级要到问题
  5. linux下交叉编译android版本的libSDL2.so
  6. 修改android项目sdk版本的方法
  7. 为Eclipse安装插件ADT plugin
  8. android studio更改兼容android低版本

随机推荐

  1. Android判断用户名只能为字母、数字和汉
  2. Android(安卓)studio Xposed框架Hook小试
  3. 打包上线流程
  4. Android(安卓)镜像文件生成流程
  5. Inflater与findViewById()区别
  6. 【安卓笔记】Tips
  7. ContactsProvider2
  8. 通知推送、导航栏、状态栏
  9. 用React Native做一个填字游戏(3)——背景
  10. android 4.0以上版本横竖屏切换后不重建