如何解决 LVL 混淆错误

发布于 2024-12-27 20:14:32 字数 2510 浏览 1 评论 0原文

我有一个项目,我已经成功使用 proguard 很长时间了,故意使用旧版本的 ADB(r12 之前)运行,因为我似乎总是遇到需要很长时间才能解决的错误。我最近更新到了 r16,这样做完全破坏了我使用 -> 在命令行上构建的能力。 “蚂蚁释放”

我发现了超载的信息,使我能够解决多个问题,但现在我遇到了以下问题,并且我尝试过的建议都不起作用:

    [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
       [dx] java.lang.IllegalArgumentException: already added: Lcom/android/vend
ing/licensing/AESObfuscator;
       [dx]     at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection
.java:123)
       [dx]     at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
       [dx]     at com.android.dx.command.dexer.Main.processClass(Main.java:486)

       [dx]     at com.android.dx.command.dexer.Main.processFileBytes(Main.java:
455)
       [dx]     at com.android.dx.command.dexer.Main.access$400(Main.java:67)
       [dx]     at com.android.dx.command.dexer.Main$1.processFileBytes(Main.jav
a:394)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.processArchive(Class
PathOpener.java:245)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPath
Opener.java:131)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpe
ner.java:109)
       [dx]     at com.android.dx.command.dexer.Main.processOne(Main.java:418)
       [dx]     at com.android.dx.command.dexer.Main.processAllFiles(Main.java:3
29)
       [dx]     at com.android.dx.command.dexer.Main.run(Main.java:206)
       [dx]     at com.android.dx.command.dexer.Main.main(Main.java:174)
       [dx]     at com.android.dx.command.Main.main(Main.java:95)
       [dx] 1 error; aborting

BUILD FAILED
C:\Users\Public\android_sdk_r3\android-sdk-windows\tools\ant\build.xml:752: The
following error occurred while executing this line:
C:\Users\Public\android_sdk_r3\android-sdk-windows\tools\ant\build.xml:754: The
following error occurred while executing this line:
C:\Users\Public\android_sdk_r3\android-sdk-windows\tools\ant\build.xml:766: The
following error occurred while executing this line:
C:\Users\Public\android_sdk_r3\android-sdk-windows\tools\ant\build.xml:256: null
 returned: 1

我知道它说正在添加 AESObfuscator两次,但我不确定它被拉入我的项目的所有不同位置。其他引用此问题的帖子导致人们提供了许多不同的可能解决方案。我希望有人能明确地告诉我要删除什么。

LVL 的 jar 文件列在“参考库”下。我手动将 jar 文件复制到 libs 文件夹以解决我遇到的其他错误。右键单击我的项目并选择“属性”-> “Java构建路径”-> “Libraries”包含 LVL jar 文件、Android 2.2 和 com.android.ide.eclipse.adt.LIBRARIES。最初“Libraries”有Android 2.2和“Reference Libraries”,但我根据其他人的建议手动删除了参考库,但这导致了Eclipse中的错误。然后,我通过选择“添加外部 JAR”手动将 LVL jar 添加回“库”,结果就是上面的 3 项。

我需要做什么来解决这个问题?谢谢。

I have a project that I've been using proguard with successfully for a long time, purposely running with an older version of ADB (pre r12) because I always seem to hit errors that take too long to resolve. I recently updated to r16, and doing so completely broke my ability to build on the command line using -> "ant release"

I found an overload of information that allowed me to resolve multiple problems, but now I have the following problem, and I've none of the suggestions I've tried has worked:

    [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
       [dx] java.lang.IllegalArgumentException: already added: Lcom/android/vend
ing/licensing/AESObfuscator;
       [dx]     at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection
.java:123)
       [dx]     at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
       [dx]     at com.android.dx.command.dexer.Main.processClass(Main.java:486)

       [dx]     at com.android.dx.command.dexer.Main.processFileBytes(Main.java:
455)
       [dx]     at com.android.dx.command.dexer.Main.access$400(Main.java:67)
       [dx]     at com.android.dx.command.dexer.Main$1.processFileBytes(Main.jav
a:394)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.processArchive(Class
PathOpener.java:245)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPath
Opener.java:131)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpe
ner.java:109)
       [dx]     at com.android.dx.command.dexer.Main.processOne(Main.java:418)
       [dx]     at com.android.dx.command.dexer.Main.processAllFiles(Main.java:3
29)
       [dx]     at com.android.dx.command.dexer.Main.run(Main.java:206)
       [dx]     at com.android.dx.command.dexer.Main.main(Main.java:174)
       [dx]     at com.android.dx.command.Main.main(Main.java:95)
       [dx] 1 error; aborting

BUILD FAILED
C:\Users\Public\android_sdk_r3\android-sdk-windows\tools\ant\build.xml:752: The
following error occurred while executing this line:
C:\Users\Public\android_sdk_r3\android-sdk-windows\tools\ant\build.xml:754: The
following error occurred while executing this line:
C:\Users\Public\android_sdk_r3\android-sdk-windows\tools\ant\build.xml:766: The
following error occurred while executing this line:
C:\Users\Public\android_sdk_r3\android-sdk-windows\tools\ant\build.xml:256: null
 returned: 1

I know that it's saying AESObfuscator is being added twice, but I'm not sure of all the various places that it is being pulled in to my project. Other posts referencing this problem resulted in people providing many different possible solutions. I'm hoping someone can tell me definitively what to remove.

LVL's jar file is listed under "Reference Libraries." I manually copied the jar file to the libs folder to resolve other errors I encountered. Right-clicking my project and selecting "Properties" -> "Java Build Path" -> "Libraries" has the LVL jar file, Android 2.2, and com.android.ide.eclipse.adt.LIBRARIES. Initially "Libraries" had Android 2.2 and "Reference Libraries" but I manually removed reference libraries at someone else's suggestion, but this caused errors in Eclipse. I then manually added the LVL jar back in "Libraries" by selecting "Add external JAR" and the result was the 3 items above.

What do I need to do to resolve this? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

残龙傲雪 2025-01-03 20:14:32

我按照此链接说明操作:

http://android-developers.blogspot.com/2010/09/proguard-android-and-licensing-server.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot% 2FhsDu+%28Android+Developers+Blog%29

然后我必须将 var 添加到 local.properties和值:
out.classes.dir=bin

清理了 bin/ 目录中的所有内容。

它有效。

祝你好运。

I followed this link instructions:

http://android-developers.blogspot.com/2010/09/proguard-android-and-licensing-server.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot%2FhsDu+%28Android+Developers+Blog%29

Then i had to add to local.properties the var and value:
out.classes.dir=bin

cleaned everything in bin/ directory.

And it works.

Good luck.

掌心的温暖 2025-01-03 20:14:32

为了让一切正常运转,我做了一些不同的事情,但不幸的是,我不确定是否有某个步骤能够达到目的。

我删除了执行升级后为每个库添加的额外 src 文件夹。

我停止使用 LVL 作为外部库,只是将源代码直接添加到我的项目中。

在 Eclipse 中,我进入 Properties -> Android,在出现的窗口的“库”部分中,我删除了所有引用。

对于我的项目中使用的 proguard 文件,Eclipse 中显示了一些特定错误,但这些错误很容易识别和纠正。

此时我认为一切都应该有效,但我仍然遇到问题。所以我清理了这个项目,突然间一切都正常了。因此,看来我需要采取上述每个步骤才能解决我的问题。

There were a few different things I did to get everything working, but unfortunately I'm uncertain if there was one certain step that did the trick.

I deleted the extra src folders that were added for each library I had after performing the upgrade.

I stopped using LVL as an external library, and just added the source code directly to my project.

In Eclipse, I went into Properties -> Android, and in the Library section of the window that appears I deleted all references.

There were specific errors that were shown in Eclipse for the proguard files being used in my project, but those were easily identified and corrected.

At this point I thought everything should have worked, but I still had problems. So I cleaned the project, and suddenly everything worked fine. So, it appears that I needed to take each of the above steps in order to solve my problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文