Android ProGuard error with org.xmlpull.v1.XmlPullParser

前端 未结 8 846
我寻月下人不归
我寻月下人不归 2021-02-05 09:36

When my application is build with ProGuard, it fails with following message. I use a default proguard.cfg generated by Android SDK with some -libraryjars. What can I do for it?<

8条回答
  •  醉话见心
    2021-02-05 09:58

    I don't have the solution yet for proguard run via eclipse for android, but if you run proguard manually from the command line, you can put the following in your proguard.cfg:

    -basedirectory /home/pjv/workspace/collectionista-repo/collectionista-main
    
    -injars /tmp/android_4500371803543847111.jar
    -injars libs/joda-time-1.6.jar(!META-INF/MANIFEST.MF)
    -injars libs/FlurryAgent.jar(!META-INF/MANIFEST.MF)
    -injars libs/veecheck-2.0.jar(!META-INF/MANIFEST.MF)
    -injars libs/commons-lang-2.4.jar(!META-INF/MANIFEST.MF,!META-INF/NOTICE.txt,!META-INF/LICENSE.txt)
    -injars libs/OIAbout-lib-temporary.jar(!META-INF/MANIFEST.MF)
    -injars libs/libGoogleAnalytics.jar(!META-INF/MANIFEST.MF)
    -injars libs/xstream-1.3.1.jar(!META-INF/MANIFEST.MF)
    -injars libs/ZQL_custom.jar(!META-INF/MANIFEST.MF)
    -injars libs/xpp3_min-1.1.4c.jar(!META-INF/MANIFEST.MF)
    -injars libs/GoogleAdMobAdsSdk-4.1.0.jar(!META-INF/MANIFEST.MF)
    -injars libs/bugsense-trace.jar(!META-INF/MANIFEST.MF)
    -outjars /tmp/android_1348923171424559204.jar
    
    -libraryjars /opt/android-sdk/android-sdk-linux_x86-1.6_r1/platforms/android-12/android.jar(!org/xmlpull/v1/XmlPullParser.class,!org/xmlpull/v1/XmlPullParserException.class)
    

    Note how XmlPullParser.class is filtered from the android API jar.

    Don't worry about the warnings related to XmlPullParser just yet. Fix the errors and other warnings first, and if you must, use -ignorewarnings in your proguard.cfg.

提交回复
热议问题