android studio 3.0 di注入插件引入错误

xiaoxiao2021-02-28  10

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+

转载请注明原文地址: https://www.6miu.com/read-1100053.html

最新回复(0)