【发布时间】:2011-11-08 07:38:57
【问题描述】:
我刚刚创建了一个需要 Dropbox.com API 库的 Android 应用。我现在正在尝试以“发布”模式构建应用程序,并希望在代码上运行 proguard 以对其进行混淆。但是,每当我尝试运行 Proguard 时,都会出现以下错误:
Proguard returned with error code 1. See console
Warning: com.dropbox.client2.DropboxAPI: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI$Entry: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI$Entry: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.ParseException
Warning: there were 8 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars'),
or perhaps the '-dontskipnonpubliclibraryclasses' option.
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:308)
at proguard.ProGuard.initialize(ProGuard.java:210)
at proguard.ProGuard.execute(ProGuard.java:85)
at proguard.ProGuard.main(ProGuard.java:499)
我已经包含了“-dontskipnonpubliclibraryclasses”选项,这对我没有任何帮助。我尝试包含“-libraryjars”选项,但我可能使用不正确,因为我不确定我打算如何使用该标志。
有没有人知道如何纠正这个错误?现在,我无法在通过 Proguard 运行我的应用程序时构建它。任何帮助表示赞赏!谢谢!
【问题讨论】:
-
我认为你应该阅读 proguard 的手册,也许可以使用 GUI 来实现它的运行:proguard.sourceforge.net/index.html#/manual/introduction.html
标签: java android dropbox proguard dropbox-api