gpt4 book ai didi

java - 使用 Proguard 导出 APK 时收到错误代码 1

转载 作者:行者123 更新时间:2023-12-01 12:30:39 25 4
gpt4 key购买 nike

当我必须使用 Proguard 导出 APK 时,我收到错误。我不明白真正的问题是什么。我的错误控制台是这样的:

[2014-09-20 10:30:44 - MyApp] Proguard returned with error code 1. See console
[2014-09-20 10:30:44 - MyApp] Warning: bsh.servlet.BshServlet: can't find superclass or interface javax.servlet.http.HttpServlet
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.AWTConsole: can't find superclass or interface java.awt.TextArea
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.AWTConsole: can't find superclass or interface java.awt.event.KeyListener
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.AWTConsole$1: can't find superclass or interface java.awt.event.WindowAdapter
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.AWTDemoApplet: can't find superclass or interface java.applet.Applet
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.AWTRemoteApplet: can't find superclass or interface java.applet.Applet
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.BeanShellBSFEngine: can't find superclass or interface org.apache.bsf.util.BSFEngineImpl
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.BshCanvas: can't find superclass or interface javax.swing.JComponent
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.ClassBrowser: can't find superclass or interface javax.swing.JSplitPane
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.ClassBrowser: can't find superclass or interface javax.swing.event.ListSelectionListener
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.ClassBrowser$1: can't find superclass or interface javax.swing.event.TreeSelectionListener
[2014-09-20 10:30:44 - MyApp] Warning: bsh.util.ClassBrowser$2: can't find superclass or interface javax.swing.event.TreeSelectionListener

请给我解决方案。提前致谢。

最佳答案

没有任何 proguard 配置可以实现此功能。

Android Java 与标准 Java 是相同的编程语言,但运行环境不同。我在 Proguard 错误消息中看到对 java.awtjavax.swingjavax.servlet 的引用。这些类在 Android 上不存在(完整的 package list is here ),并且再多的 Proguard 配置也无法添加它们。

您必须剥离 Beanshell 库以删除所有无法使用的可选位。然后将精简版本包含在您的项目中并重试。

关于java - 使用 Proguard 导出 APK 时收到错误代码 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25945474/

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