如何解决error:execution failed for task app:transformclasseswithjarmerging
2017-09-11 14:38
411 查看
1.dexDebug ExecException finished with non-zero exit value 2 需要在gradle中配置下面的代码,原因是引用了多个libraries文件 defaultConfig { multiDexEnabled true }
2.Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/app/BackStackState$1.class 原因:在所添加的jar包或aar包中也引用了support-V4,与工程中引用的相冲突 Ctrl+N --> 在搜索框中输入BackStackState --> 查找到所有引用该类的类,这些类即为引起冲突的类 去掉本工程中gradle中用于引用有冲突的包的代码或者将冲突的代码从jar包或aar包中移除,确保一个module中只引用了一份相同的第三方包
3.project sturcture和Project Structure 无论是按快捷键或者是从files中打开都不显示event log中报:IllegalArgumentException:Multiple entries with same key: Google Inc.:Google APIs:23=Google APIs (Google Inc.) (API 23) and Google Inc.:Google APIs:23=Google APIs (Google Inc.) (API 23)解决办法:先看一下系统配置的SDK的位置和Android Studio所用的路径是否一致,如果不一致重新配置系统的SDK路径或者是重新修改Android Studio的SDK路径通过SDK Manager删除掉google API23如果解决不了,卸载android studio -->重新安装 ,还有问题点击File --> Invalidate Cashes/Restart --> Invalidate and Restart,解决不了继续通过SDK Manager删除掉google API23
相关文章推荐
- 如何解决error:execution failed for task app:transformclasseswithjarmerging(包冲突)
- android Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease' 解决方法大全
- 如何解决编译时Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
- 解决:Error:Execution failed for task ':app:transformClassesWithJarMergingForRealD
- 安卓中编译报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决
- 解决 Android 编译报错:Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
- 完美解决Error:Execution failed for task ':APP:transformClassesWithDexForDebug'...问题
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'.解决方法
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'.问题汇总解决
- 完美解决Error:Execution failed for task ':APP:transformClassesWithDexForDebug'...问题
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录
- 完美解决Error:Execution failed for task ':APP:transformClassesWithDexForDebug'...问题
- Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'...$LayoutParams.clas
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录
- 完美解决Error:Execution failed for task ':APP:transformClassesWithDexForDebug'...问题
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录
- AS中运行项目时出现Error:Execution failed for task ':app:transformClassesWithDexForDebug'...问题解决
- Android Studio Error:Execution failed for task ':app:transformClassesWithDexForDebug' 解决办法
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录