安卓 - Proguard 返回错误代码1。请查看控制台。

3
我有一个关于Proguard的问题。在控制台上我得到了这个错误信息。 我使用的是Proguard 4.11。如何解决这个问题?
    [2014-02-11 12:46:55 - Distributor] Proguard returned with error code 1. See console
    [2014-02-11 12:46:55 - Distributor] Note: there were 4 duplicate class definitions.
    [2014-02-11 12:46:55 - Distributor]       (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.content.res.ColorStateList depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.graphics.drawable.ColorDrawable depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.graphics.drawable.LevelListDrawable depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
    [2014-02-11 12:46:55 - Distributor] Warning: there were 12 instances of library classes depending on program classes.
    [2014-02-11 12:46:55 - Distributor]          You must avoid such dependencies, since the program classes will
    [2014-02-11 12:46:55 - Distributor]          be processed, while the library classes will remain unchanged.
    [2014-02-11 12:46:55 - Distributor]          (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)
    [2014-02-11 12:46:55 - Distributor] Error: Please correct the above warnings first.

控制台消息提供了两个损坏的链接,以便您了解这两个问题。您仍然可以通过转到Proguard页面上的手册->故障排除来查找信息。 - Simon
1个回答

6

我在proguard-project.txt文件中添加了这行代码。

    -dontwarn org.xmlpull.v1.**

将此行添加到project.properties文件中。
   proguard.config=proguard-project.txt

它帮助我创建了构建,但生成的构建立即关闭了。 - Srinivasan

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接