错误:任务':android:transformClassesAndResourcesWithPr

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

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

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)