belerweb/pinyin4j

编译失败

mycrossroads opened this issue · 7 comments

我在我们的util库中使用 compile ('com.belerweb:pinyin4j:2.5.0'),然后加入了 packagingOptions { exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.xml' exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.properties' },在引用util库的项目中编译报错,
`Execution failed for task ':app:transformClassesWithStackFramesFixerForProductDebug'.

com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.utils.FileCache$FileCreatorException: java.util.zip.ZipException: duplicate entry: META-INF/maven/com.belerweb/pinyin4j/pom.xml
`,在引用util库的项目中也加入了exclude仍然不行,这个该怎么办呢?

JaySX commented

哥们,这个问题解决了吗

同问,我也加了exclude,但仍然报同样的错误。

我在我们的util库中使用 compile ('com.belerweb:pinyin4j:2.5.0'),然后加入了 packagingOptions { exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.xml' exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.properties' },在引用util库的项目中编译报错,
`Execution failed for task ':app:transformClassesWithStackFramesFixerForProductDebug'.

com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.utils.FileCache$FileCreatorException: java.util.zip.ZipException: duplicate entry: META-INF/maven/com.belerweb/pinyin4j/pom.xml
`,在引用util库的项目中也加入了exclude仍然不行,这个该怎么办呢?
同问,我也加了exclude,但仍然报同样的错误。请问解决嘛?

哥们,这个问题解决了吗

我这边升级到2.5.1版本就好了

有人知道出现这个问题最根本的原因是什么吗?
image

image
image
你如果直接编译肯定不成,因为它连test也编译了,这样试试,我成功了。……你应该是打包是编译出错吧,希望我没有回答错问题。