ProGuard的地狱 - 无法找到引用的类 [英] proguard hell - can't find referenced class

查看:280
本文介绍了ProGuard的地狱 - 无法找到引用的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我的 TRYING 的释放一些软件,但Proguard的是让我头疼。

So, I'm TRYING to release some software but Proguard is giving me a headache.

当我尝试使用ProGuard的我得到很多的警告,即找不到引用的类的出口

When I try to export using proguard I'm getting lots of warning ie "can't find referenced class"

例如:

[2011-08-07 17:44:37 - GAME] Warning: org.simpleframework.xml.stream.StreamReader: can't find referenced class javax.xml.stream.events.XMLEvent
[2011-08-07 17:44:37 - GAME] Warning: there were 52 unresolved references to classes or interfaces.
[2011-08-07 17:44:37 - GAME]          You may need to specify additional library jars (using '-libraryjars'),
[2011-08-07 17:44:37 - GAME]          or perhaps the '-dontskipnonpubliclibraryclasses' option.
[2011-08-07 17:44:37 - GAME] java.io.IOException: Please correct the above warnings first.
[ 

的警告似乎与simpleframework,所以在我的ProGuard配置文件我已经添加了以下内容:

The warnings seem to related to simpleframework, so in my proguard config file I've added the following:

-libraryjars pathtoprojecttolibs\simple-xml-2.4.jar

其中, pathtoprojecttolibs 是路径罐子这是由我的项目中引用。

Where pathtoprojecttolibs is the path to jars which are referenced by my project.

这没什么区别。

如果使用javax我可以告诉ProGuard的simpleframework引用忽视这一点?

If simpleframework references javax can I tell proguard to ignore this too??

任何想法?

推荐答案

org.simpleframework.xml.stream.StreamReader 在code指的<$​​ C $ C> javax.xml.stream.events.XMLEvent 。后一类是Java运行时的一部分(的rt.jar ),但在Android运行时(而不是一部分<$ C C $>的android.jar ),这样的ProGuard警告说,一些可能被打破。如果你确信你的应用程序的工作,无论如何,你可以指定

org.simpleframework.xml.stream.StreamReader in your code refers to javax.xml.stream.events.XMLEvent. The latter class is part of the Java runtime (rt.jar) but not part of the Android runtime (android.jar), so ProGuard warns that something might be broken. If you're sure that your application works anyway, you can specify

-dontwarn javax.xml.stream.events.**

ProGuard的地狱?

ProGuard hell?

这篇关于ProGuard的地狱 - 无法找到引用的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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