1
我将一些现有的基于Eclipse的Android项目导入到Android Studio中。一直以来,我的方式修正了几个问题,我打这最后一个问题(希望):com.android.build.api.transform.TransformException:java.util.zip.ZipException
Execution failed for task ':myapp:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/mypackage/myapp/BuildConfig.class
这里有依赖关系: 模块1:
dependencies {
provided files('src/main/libs/opencv.jar')
}
模块2:
dependencies {
compile files('libs/autobanh.jar')
compile files('libs/libjingle_peerconnection_java.jar')
}
单词数:
dependencies {
compile 'com.google.code.gson:gson:2.2.1'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services:+'
compile files('src/main/libs/gcm.jar')
}
版Module:
dependencies {
compile project(':module3')
compile 'com.google.android.gms:play-services:+'
}
最后的应用程序:
dependencies {
compile project(':module1')
compile project(':module2')
compile project(':module3')
compile project(':module4')
compile 'com.android.support:support-v4:23.4.0'
compile files('libs/AndroidSwipeLayout-v1.1.8.jar')
compile 'com.android.support:appcompat-v7:23.4.0'
}
我该如何解决这个问题?到目前为止,我尝试了以下内容:
Execution failed for transformClassesWithJarMergingForDebug'. (Volley)
没有帮助。有什么想法吗?
每个模块中有一个独特的包名必须在他们的表现不同的软件包名称。除最后一个之外的所有模块都必须是库。 –
@EugenPechanec你已经发现了重复的包名。我有一个重复的包名称,并已设置: enforceUniquePackageName = false 更改module4的包名称后,它已经超过该问题。万分感谢。请记录您的评论作为我接受的答案。 – ssk