gpt4 book ai didi

android - Proguard 与 Unity3d 返回错误代码 1

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:31:37 26 4
gpt4 key购买 nike

我在 Unity 3d 中使用 proguard 4.11

在我的项目中,我在我的 libs 文件夹中包含了 unity-classes.jar

当我生成 apk 时,它给出了以下异常

    [2014-05-03 14:33:41 - FBUnityPlayerActivity] Proguard returned with error code 1. See console
[2014-05-03 14:33:41 - FBUnityPlayerActivity] java.io.IOException: Can't read [C:\Users\TAT\Desktop\quick\FBUnityPlayerActivity\libs\unity-classes.jar] (Can't process class [com/unity3d/player/UnityPlayer.class] (Unknown verification type [195] in stack map frame))
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.InputReader.readInput(InputReader.java:232)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.InputReader.readInput(InputReader.java:202)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.InputReader.readInput(InputReader.java:180)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.InputReader.execute(InputReader.java:78)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.ProGuard.readInput(ProGuard.java:196)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.ProGuard.execute(ProGuard.java:78)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.ProGuard.main(ProGuard.java:483)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] Caused by: java.io.IOException: Can't process class [com/unity3d/player/UnityPlayer.class] (Unknown verification type [195] in stack map frame)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.io.ClassReader.read(ClassReader.java:112)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.io.JarReader.read(JarReader.java:65)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.InputReader.readInput(InputReader.java:228)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] ... 6 more
[2014-05-03 14:33:41 - FBUnityPlayerActivity] Caused by: java.lang.RuntimeException: Unknown verification type [195] in stack map frame
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.io.ProgramClassReader.createVerificationType(ProgramClassReader.java:890)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.io.ProgramClassReader.visitFullFrame(ProgramClassReader.java:659)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.attribute.preverification.FullFrame.accept(FullFrame.java:114)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.io.ProgramClassReader.visitStackMapTableAttribute(ProgramClassReader.java:452)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.attribute.preverification.StackMapTableAttribute.accept(StackMapTableAttribute.java:71)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.io.ProgramClassReader.visitCodeAttribute(ProgramClassReader.java:422)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.io.ProgramClassReader.visitProgramMethod(ProgramClassReader.java:200)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.io.ProgramClassReader.visitProgramClass(ProgramClassReader.java:142)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] at proguard.io.ClassReader.read(ClassReader.java:91)
[2014-05-03 14:33:41 - FBUnityPlayerActivity] ... 12 more

我已经尝试过使用

-libraryjars /libs/unity-classes.jar
-keep class com.unity3d.** { *; }
-dontwarn com.unity3d.**

在 proguard-project.txt 中,还是一样,如何修复?感谢您的帮助

甚至尝试过

-保持类com.** { *;

还是一样

最佳答案

请参阅之前关于 Proguard errors with unity-classes.jar 的问题.

这是 Unity 库中类的问题:一些预验证元数据已损坏。您应该检查是否有更新的版本。否则,您可以修改 ProGuard 以接受损坏的类,如其 issue tracker 中所讨论的那样.

请注意,您不应将 -libraryjars 或 -injars 添加到您的配置中。 Android 构建过程(Ant、Eclipse、Gradle)已经为您指定了这些选项。

关于android - Proguard 与 Unity3d 返回错误代码 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23441152/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com