问题描述
每次我在运行我的项目时遇到这个错误.我可以做一个清洁然后再次运行,它可以工作.但这不是最佳解决方案.有什么想法吗?
错误:任务 ':android:transformClassesAndResourcesWithProguardForRelease' 的执行失败.
<块引用>
java.io.IOException: 无法将 androiduildintermediates ransformsproguard eleasefolders31fmainclasses.jar 重命名为 androiduildintermediates ransformsproguard eleasejars31fclasses.jar
当 SDK、Build Tools 和 Gradle Plugins 的版本不匹配(在兼容性方面)时,会发生此错误.解决方案是验证您是否使用它们的最新版本.gradle 插件放在项目的 build.gradle 文件中.其他版本在模块的 build.gradle 文件中.对于example,对于SDK 23,您必须使用Build Tools 23.0.1 和gradle plugins version 1.3.1.强>
更改设置后清理项目.(解决了我的问题,再也没见过.)
参考这个问题
Every time I am getting this error when running my project. I can do a Clean and then Run again, and it works. But it is not an optimal solution. Any ideas?
Error:Execution failed for task ':android:transformClassesAndResourcesWithProguardForRelease'.
java.io.IOException: Failed to rename androiduildintermediates ransformsproguard eleasefolders31fmainclasses.jar to androiduildintermediates ransformsproguard eleasejars31fclasses.jar
This bug happens when the versions of SDK, Build Tools and Gradle Plugins doesn't match (in terms of compatibility). The solution is to verify if you are using the latest versions of them. The gradle plugins are placed in the build.gradle file of the project. Other versions are in the build.gradle file of the module. For example, for SDK 23, you must use the Build Tools 23.0.1 and gradle plugins version 1.3.1.
Clean the project after changing settings. (Solved my problem, and never seen it again.)
refer this question
这篇关于错误:任务':android:transformClassesAndResourcesWithProguardForRelease'的执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!