belerweb / pinyin4j

A copy of http://sourceforge.net/projects/pinyin4j, then deploy it to maven central repository.
1.24k stars 308 forks source link

Android Studio 3.0 duplicate entry #10

Open Nathaniel100 opened 7 years ago

Nathaniel100 commented 7 years ago

Error:Execution failed for task ':app:transformClassesWithStackFramesFixerForMockDebug'.

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

ps: packagingOptions is not working.

fmaylinch commented 7 years ago

Hi, I have a similar problem. I'm still looking for the solution.

https://stackoverflow.com/questions/47013535/getting-duplicate-entry-meta-inf-license-with-android-studio-3-0

fmaylinch commented 7 years ago

I just found a fix, I hope it helps you.

trondarild-lode-tobiassen-heidelberg commented 6 years ago

The fix did not help me. I seems a somewhat of a workaround too. I opened the jar in two different zip toos and jar -tvf. In jar and winrar the pom.xml and pom.proerties are listed twice!!. In winexpress only once. The gradle exception says java.util.zip.ZipException so something is wrong here. In jar tvf the files are listed once during the listing of folders an once again at the end of the listing - as files. I guess gradle must handle java listings from java.util.zip / jar and not throw exception. I will try to file a more official bug report with the android community.

wangzhzh commented 6 years ago

我也碰到了类似问题,使用 Java8 就没有问题了

JayRichrd commented 5 years ago

我也碰到了类似问题,使用 Java8 就没有问题了

我使用了java8,但还是有同样的问题

wangzhzh commented 5 years ago

把pinyin4j升级到2.5.1就好了

JayRichrd commented 5 years ago

把pinyin4j升级到2.5.1就好了

但是我看pinyin4j这个仓库最新的版本就仅仅只到2.5.0,2.5.1已经发布了吗?

JayRichrd commented 5 years ago

把pinyin4j升级到2.5.1就好了

嗯嗯,升级到2.5.1后确实就可以了

wangzhzh commented 5 years ago

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

image