【问题标题】:Android: Proguard error in eclipseAndroid:日食中的Proguard错误
【发布时间】:2016-04-15 06:25:58
【问题描述】:

我正在尝试构建我的应用的签名 apk。但我得到的错误弹出为

Proguard returned with error code 1. See console

并且错误登录控制台为:

[2016-04-15 11:36:44 - MyApp] Proguard returned with error code 1. See console
[2016-04-15 11:36:44 - MyApp] Note: there were 85 duplicate class definitions.
[2016-04-15 11:36:44 - MyApp] Warning: org.acra.ErrorReporter: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in class android.app.Notification
[2016-04-15 11:36:44 - MyApp]       You should check if you need to specify additional program jars.
[2016-04-15 11:36:44 - MyApp] Warning: there were 1 unresolved references to program class members.
[2016-04-15 11:36:44 - MyApp]          Your input classes appear to be inconsistent.
[2016-04-15 11:36:44 - MyApp]          You may need to recompile them and try again.
[2016-04-15 11:36:44 - MyApp]          Alternatively, you may have to specify the option 
[2016-04-15 11:36:44 - MyApp]          '-dontskipnonpubliclibraryclassmembers'.
[2016-04-15 11:36:44 - MyApp] java.io.IOException: Please correct the above warnings first.
[2016-04-15 11:36:44 - MyApp]   at proguard.Initializer.execute(Initializer.java:321)
[2016-04-15 11:36:44 - MyApp]   at proguard.ProGuard.initialize(ProGuard.java:211)
[2016-04-15 11:36:44 - MyApp]   at proguard.ProGuard.execute(ProGuard.java:86)
[2016-04-15 11:36:44 - MyApp]   at proguard.ProGuard.main(ProGuard.java:492)

我无法理解问题所在。对于上一个版本,它工作正常。我只是在这个版本中为 Marsh Mellow 提供支持。

请建议我在没有 Proguard 错误的情况下对构建的签名 apk 执行哪些更改或步骤。

【问题讨论】:

  • 请展示使用你的proguard规则

标签: android proguard android-support-library android-proguard


【解决方案1】:

尝试将此添加到 Proguard 配置文件中:

-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**
-dontwarn android.net.**

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-12-08
    • 2010-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多