我怎么知道Proguard会警告我哪些课程? [英] How can I tell which classes Proguard warns me about?

查看:165
本文介绍了我怎么知道Proguard会警告我哪些课程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试发布我的应用程序,而ProGuard导致服务器代码出现各种错误,因此我进入了gradle控制台并看到了以下内容:

I am trying to release my app and ProGuard is causing all sorts of errors with my server code so I went into the gradle console and see this:

Note: there were 2 references to unknown classes.
  You should check your configuration for typos.
  (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Note: there were 26 unkept descriptor classes in kept class members.
  You should consider explicitly keeping the mentioned classes
  (using '-keep').
  (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass)
Note: there were 22 unresolved dynamic references to classes or interfaces.
  You should check if you need to specify additional program jars.
  (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Note: there were 15 accesses to class members by means of introspection.
  You should consider explicitly keeping the mentioned class members
  (using '-keep' or '-keepclassmembers').
  (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)

一切都很好,但是我怎么知道ProGuard在谈论哪些具体参考呢?他们肯定不希望我独立找到/记住这些参考文献吗?

That's all fine and dandy, but how the heck do I know which specific references ProGuard is talking about? Surely they don't expect me to find/remember these references independently?

推荐答案

在特定于模块的构建文件夹中,会创建usage.txt文件.

In your module specific build folder, usage.txt file gets created.

build/outputs/mapping/release/usage.txt

此文件包含所有已删除的方法以及受影响的类.确保没有删除您自己项目中任何重要的类.

This file contains what are all the methods removed and what are the classes effected. Make sure that any of the classes from your own project which matters are not removed.

这篇关于我怎么知道Proguard会警告我哪些课程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆