我刚刚创建了一个需要 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 运行我的应用程序时构建它。任何帮助表示赞赏!谢谢!