Android studio升级3.0,提示“Error:Cannot choose between the following configurations of project”错误
来源:互联网 发布:汇编怎么写网络程序 编辑:程序博客网 时间:2024/06/05 08:44
Android studio升级到3.0,原来正常的项目,加载编译时,提示“Error:Cannot choose between the following configurations of project”错误:
Error:Cannot choose between the following configurations of project :XXX: - debugApiElements - debugRuntimeElements - releaseApiElements - releaseRuntimeElementsAll of them match the consumer attributes: - Configuration 'debugApiElements': - Found com.android.build.api.attributes.BuildTypeAttr 'debug' but wasn't required. - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required. - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required. - Found org.gradle.api.attributes.Usage 'java-api' but wasn't required. - Configuration 'debugRuntimeElements': - Found com.android.build.api.attributes.BuildTypeAttr 'debug' but wasn't required. - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required. - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required. - Found org.gradle.api.attributes.Usage 'java-runtime' but wasn't required. - Configuration 'releaseApiElements': - Found com.android.build.api.attributes.BuildTypeAttr 'release' but wasn't required. - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required. - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required. - Found org.gradle.api.attributes.Usage 'java-api' but wasn't required. - Configuration 'releaseRuntimeElements': - Found com.android.build.api.attributes.BuildTypeAttr 'release' but wasn't required. - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required. - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required. - Found org.gradle.api.attributes.Usage 'java-runtime' but wasn't required.
解决办法:
1、project的build.gradle文件,删除“apt”配置:
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' //删除2、module的build.gradle文件,删除“android-apt”引用:
apply plugin: 'android-apt' //删除3、module的build.gradle文件,修改“dependencies”中的“apt”方式 为“annotationProcessor”方式:
apt "引用项" //老方式,删除annotationProcessor "引用项" //新方式
阅读全文
0 0
- Android studio升级3.0,提示“Error:Cannot choose between the following configurations of project”错误
- Android studio 报Error:The number of method references in a .dex file cannot exceed 64K错误
- 2 Which of the following cannot be used as input to the SQL Tuning Advisor? (Choose all that apply.)
- 项目提示 Cannot change version of project facet Dynamic Web Module to 2.5 错误
- Android Studio升级时提示网络链接错误的解决方法
- Android Studio常见错误之:Rendering Problems/The following classes could not be instantiated
- Android Studio 编译布局文件错误之:Rendering Problems The following classes could not be instantiated
- Android Studio常见错误之:Rendering Problems/The following classes could not be instantiated
- Android Studio常见错误之:Rendering Problems/The following classes could not be instantiated
- Listener refused the connection with the following error 错误解
- Listener refused the connection with the following error 错误解决
- Listener refused the connection with the following error 错误解决
- Listener refused the connection with the following error 错误解决
- Listener refused the connection with the following error 错误解决
- Listener refused the connection with the following error 错误解决
- Java错误提示------------------Cannot reduce the visibility of the inherited method from MouseListener
- Android studio中提示 Error inflating class fragment错误
- Android Studio提示错误:Error running app: Instant Run requires
- 0 导读
- highcharts绘制3D图表
- 栈和队列的应用相关习题及详解 ——数据结构
- 笑脸图
- SVN仓库迁移
- Android studio升级3.0,提示“Error:Cannot choose between the following configurations of project”错误
- web前端架构师的能力问题
- kafka是什么
- FastLink
- android中创建数据库
- Unity 控制台报错问题
- Webpack 从入门到放弃
- Linux中的yum命令与配置
- 6.Vue教程:http://www.jb51.net/Special/874.htm