您的位置:首页 > 其它

transformClassesWithJarMergingForDebug

2016-06-27 20:21 309 查看
transformClassesWithJarMergingForDebug

1.dexDebug ExecException finished with non-zero exit value 2 全bug日志如下:

(Error:Execution failed for task ‘:app:dexDebug’.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘D:\JDK8\jdk1.8.0_11\bin\java.exe” 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

Error:Execution failed for task ‘:app:transformClassesWithJarMergingForDebug’.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/ArrayRes.class

Error:Execution failed for task ‘:app:transformClassesWithJarMergingForDebug’.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/ServerError.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

4.

Error:Execution failed for task ‘:app:clean’.

Unable to delete directory: E:\as_workspaces\DJIgo\app\build\intermediates\res\merged\debug

项目中有错,无法删除这个文件夹下面的文件

5.

Error:Execution failed for task ‘:tongyan_bugs_framework_master:processDebugAndroidTestManifest’.

java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 18 cannot be smaller than version 19 declared in library [DJIgo:tysubwayinspection3.0-framework:unspecified] E:\as_workspaces\DJIgo\tongyan_bugs_framework_master\build\intermediates\exploded-aar\DJIgo\tysubwayinspection3.0-framework\unspecified\AndroidManifest.xml

Suggestion: use tools:overrideLibrary=”com.tongyan.framework” to force usage

应该是Library的sdk的版本与app的sdk的版本有冲突

6.

Error:Execution failed for task ‘:app:processDebugManifest’.

Manifest merger failed : uses-sdk:minSdkVersion 17 cannot be smaller than version 19 declared in library [DJIgo:tongyan-djigo-lib:unspecified] E:\as_workspaces\DJIgo\app\build\intermediates\exploded-aar\DJIgo\tongyan-djigo-lib\unspecified\AndroidManifest.xml

Suggestion: use tools:overrideLibrary=”com.tongyan.lib.djigo” to force usage

7.

Error:Execution failed for task ‘:tongyan-djigo-lib:compileReleaseJavaWithJavac’.

Compilation failed; see the compiler error output for details.

http://stackoverflow.com/questions/33404552/execution-failed-for-task-appcompiledebugjavawithjavac-in-android-studio

8.

注: E:\as_workspaces\DJIgo\tongyan-djigo-lib\src\main\java\com\tongyan\lib\djigo\ui\view\ControlMoveView.java使用或覆盖了已过时的 API。

注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 android studio-File->Project Structure->Android sdk location(路径应该不正确)

9.

Error:Execution failed for task ‘:app:compileDebugJavaWithJavac’.

java.io.FileNotFoundException: E:\as_workspaces\TYSubway\app\libs\pushservice-4.5.6.88.jar (系统找不到指定的文件。)

需要把dependencies中的lib包下面的jar包全部取消下,再添加。

10.

Error:Execution failed for task ‘:tysubwayinspection3.0-framework:packageReleaseResources’.

java.io.IOException: Could not delete folder E:\as_workspaces\DJIgo\tysubwayinspection3.0-framework\build\intermediates\bundles\release\res

11.由于使用sdk5.0造成的以下问题,需要用sdk6.0

E:\as_workspaces\DJIgo\app\build\intermediates\res\merged\debug\values-v23\values-v23.xml

Error:(3) Error retrieving parent for item: No resource found that matches the given name ‘android:TextAppearance.Material.Widget.Button.Inverse’.

Error:(18) Error retrieving parent for item: No resource found that matches the given name ‘android:Widget.Material.Button.Colored’.

Error:Execution failed for task ‘:app:processDebugResources’.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘D:\Android\adt-bundle-windows-x86_64-20140702\android_sdk\build-tools\23.0.0\aapt.exe” finished with non-zero exit value 1

12.

Error:Execution failed for task ‘:app:clean’.

Unable to delete file: E:\as_workspaces\DjiGo-Demo\app\build\intermediates\exploded-aar\com.android.support\support-v4\23.3.0\jars\classes.jar

项目中有错

13.

Error:Execution failed for task ‘:app:transformClassesWithJarMergingForDebug’.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/IntegerRes.class

包冲突了,在app及子library中仔细找是否有相同的jar包

14.

Error:Execution failed for task ‘:app:clean’.

Unable to delete directory: E:\as_workspaces\DJIGO_FLY\app\build\outputs\apk

无法删除这个文件夹下的文件,到目录下面就知道了。

15.

关于R文件无法引入,导致很长时间无法找到错误的根源。比如:如果错误在A类里面发生,但是Message里提示的是B类的R文件无法引入。

这样你就要用排除法,就像做选择题,要将B类的问题先注释掉,A类里面的问题才会暴露出来。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  bug