zl程序教程

您现在的位置是:首页 >  移动开发

当前栏目

app:transformClassesWithJarMergingForDebug uplicate entry: android/support/v4/app/BackStackState$1.class

AndroidApp Class support v4 entry
2023-09-27 14:27:21 时间
.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中只引用了一份相同的第三方包