xamarin proguard不能写资源[META-INF / MANIFEST.MF]

时间:2017-11-13 13:38:37

标签: c# android xamarin apk proguard

我在Proguard中使用Xamarin时遇到了麻烦。首先,我在Proguard时遇到错误1,但我使用自定义proguard配置修复了错误。

-dontwarn com.facebook.ads.internal.adapters.**
-keep class com.facebook.ads.internal.adapters.**
-dontwarn  android.support.multidex.**
-keep class  android.support.multidex.**
-dontwarn com.google.android.gms.**
-keep class com.google.android.gms.**

当我清理并builded我的解决方案时,我发现了这些错误:

can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [classes.jar:META-INF/MANIFEST.MF])
can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [bolts-tasks.jar:META-INF/MANIFEST.MF])
can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [classes.jar:META-INF/MANIFEST.MF])
can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [zxing.core.jar:META-INF/MANIFEST.MF])
can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [android-support-multidex.jar:META-INF/MANIFEST.MF])
can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [classes.jar:META-INF/MANIFEST.MF])

尽管有这些错误,我的构建完成了。但是当我比较我的apk文件时,无论是否有Proguard,大小都是一样的! (它就像Proguard没有工作......)

我尝试了许多像here这样的解决方案,但没有一个解决方案......

我还用更新的版本和facebook分叉更新了proguard,但它没有用。

我该如何解决?

0 个答案:

没有答案