错误:任务':android:transformClassesAndResourcesWithProguardF

Error:Execution failed for task #39;:android:transformClassesAndResourcesWithProguardForRelease#39;(错误:任务:android:transformClassesAndResourcesWithProguardForRelease的执行失败)
本文介绍了错误:任务':android:transformClassesAndResourcesWithProguardForRelease'的执行失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

每次我在运行我的项目时遇到这个错误.我可以做一个清洁然后再次运行,它可以工作.但这不是最佳解决方案.有什么想法吗?

错误:任务 ':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'的执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出现 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中获取当前风味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修复“意外元素lt;查询gt;在“清单中找到错误?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多风味库的多风味应用)
Android dependency has different version for the compile and runtime(Android 依赖在编译和运行时有不同的版本)
Transitive dependencies for local aar library(本地 aar 库的传递依赖)