zoukankan      html  css  js  c++  java
  • android Proguard混淆问题解决方案

    问题一:

    error conversion to Dalvik format failed with error 1

    解决方法:

    打开 [Android SDK Installation Directory]\tools\proguard\bin\proguard.bat. 做如下替换:

        call %java_exe%-jar "%PROGUARD_HOME%"\lib\proguard.jar %*

    替换为

        call %java_exe%-jar "%PROGUARD_HOME%"\lib\proguard.jar %1%2%3%4%5%6%7%8%

     


     

    问题二:

    Proguard returned with error code 1. See console
    Proguard Error 1 
    Output: 
    Note: there were 4 duplicate class definitions. 
    Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser 
    Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser 
    Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser 
    Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser 
    Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser 
    Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser 
    Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser 
    Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser 
          You should check if you need to specify additional program jars. 
    Warning: there were 8 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. 
    java.io.IOException: Please correct the above warnings first. 
            at proguard.Initializer.execute(Initializer.java:308) 
            at proguard.ProGuard.initialize(ProGuard.java:210) 
            at proguard.ProGuard.execute(ProGuard.java:85) 
            at proguard.ProGuard.main(ProGuard.java:499)

     

    解决方法:

    方法一:

    在proguard.cfg中增加

    -ignorewarnings

     

    方法二:

    proguard.cfg 中增加

    -dontwarn

     

  • 相关阅读:
    开窗函数Over用法
    Linux文件搜索命令
    Linux更改文件或目录的所有者和所有组
    Linux权限管理
    不使用临时变量 交换两个变量值
    jQuery获取区间随机数
    jQuery对checkbox选中和取消选中操作
    MySQL优化
    MySQL中explain的用法
    MySQL中好用的GROUP_CONCAT函数
  • 原文地址:https://www.cnblogs.com/gaven/p/2640690.html
Copyright © 2011-2022 走看看