java - ProGuard 警告 : there were 7 unresolved references to program class members

标签 java jar proguard

ProGuard 停止并出现大量警告:

Warning: there were 1221 unresolved references to classes or interfaces. You may need to add missing library jars or update their versions. If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options. (http://proguard.sourceforge.net/manual/troubleshooting. html#unresolvedclass)

Warning: there were 37 instances of library classes depending on program classes. You must avoid such dependencies, since the program classes will be processed, while the library classes will remain unchanged. (http://proguard.sourceforge.net/manual/troubleshooting. html#dependency) Warning: there were 7 unresolved references to program class members. Your input classes appear to be inconsistent. You may need to recompile the code. (http://proguard.sourceforge.net/manual/troubleshooting. html#unresolvedprogramclassmember)

Error: Please correct the above warnings first.

但是我的 jar 运行正常。我不太熟悉 proguard 设置。有什么建议吗?

最佳答案

我将引用您问题中非常相关的部分(即答案)。

If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options

因此,使用 -dontwarn 运行它,因为我的 jar 运行正确。

已记录(根据您的问题)here还有一个选项 -libraryjars 如果您有要添加的外部库,您可以使用它。

关于java - ProGuard 警告 : there were 7 unresolved references to program class members,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27935058/

相关文章:

java - 使用 Java 处理表单数据

java - JSON 中的 WebApplicationException 使用

java - 如何向所有线程发送消息

java - 如何在云端部署Java桌面Swing应用程序?

Android,Proguard 到底是做什么的?

java - 使用 JDBC 从 Oracle 获取唯一索引的所有外键

java - 从jar中读取资源文件

java - Maven 包未将依赖项分组在一起

java - 为什么 Retrofit & Gson 返回一个 LinkedTreeMap 列表而不是我预期的类型?

java - 在 OS X : Where is Apple's equivalent to the rt. jar 上运行 ProGuard?