【问题标题】:eclipse fails to export apk as a result of progaurd error 1 code由于 progaurd 错误 1 ​​代码,eclipse 无法导出 apk
【发布时间】:2014-09-11 17:45:04
【问题描述】:

这是我尝试导出带有 proguard 的 apk 文件时得到的结果。如果我将其关闭,它会导出 apk 文件。请注意,这不是所有的痕迹,因为其余的将超过字符限制

 [2014-09-11 20:35:39 - Simplify] Warning: android.support.v4.view.accessibility.AccessibilityNodeInfoCompatKitKat: can't find referenced method 'int getLiveRegion()' in class android.view.accessibility.AccessibilityNodeInfo
    [2014-09-11 20:35:39 - Simplify] Warning: android.support.v4.view.accessibility.AccessibilityNodeInfoCompatKitKat: can't find referenced method 'void setLiveRegion(int)' in class android.view.accessibility.AccessibilityNodeInfo
    [2014-09-11 20:35:39 - Simplify] Warning: android.support.v4.widget.ListPopupWindowCompatKitKat: can't find referenced method 'android.view.View$OnTouchListener createDragToOpenListener(android.view.View)' in class android.widget.ListPopupWindow
    [2014-09-11 20:35:39 - Simplify] Warning: android.support.v4.widget.PopupMenuCompatKitKat: can't find referenced method 'android.view.View$OnTouchListener getDragToOpenListener()' in class android.widget.PopupMenu
    [2014-09-11 20:35:39 - Simplify]       You should check if you need to specify additional program jars.
    [2014-09-11 20:35:39 - Simplify] Warning: there were 193 unresolved references to classes or interfaces.
    [2014-09-11 20:35:39 - Simplify]          You may need to specify additional library jars (using '-libraryjars').
    [2014-09-11 20:35:39 - Simplify] Warning: there were 43 unresolved references to program class members.
    [2014-09-11 20:35:39 - Simplify]          Your input classes appear to be inconsistent.
    [2014-09-11 20:35:39 - Simplify]          You may need to recompile them and try again.
    [2014-09-11 20:35:39 - Simplify]          Alternatively, you may have to specify the option 
    [2014-09-11 20:35:39 - Simplify]          '-dontskipnonpubliclibraryclassmembers'.
    [2014-09-11 20:35:39 - Simplify] Error: Please correct the above warnings first.

【问题讨论】:

    标签: android obfuscation proguard


    【解决方案1】:

    你有两个选择。最安全的选择是解决 Proguard 错误,其故障排除指南为 here

    第二个选项是将-ignorewarnings 添加到您的 proguard 配置中,它仍会打印警告,但无论如何都会允许构建成功。当您的应用程序找不到 proguard 错误警告您的某些类/方法/字段时,这可能会导致运行时错误,或者可能不会,因为这些错误也可能是由 android 运行时版本等之间的差异引起的。

    【讨论】:

      【解决方案2】:

      安装新的 eclipse 版本解决了我所有的问题

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-03-12
        • 2012-10-11
        • 1970-01-01
        相关资源
        最近更新 更多