【问题标题】:proguard errors with AndroidAsync使用 AndroidAsync 保护错误
【发布时间】:2016-03-29 07:03:23
【问题描述】:

我在我的 android 项目中使用了 AndroidAsync 库。

由于发出了 proguard 警告,现在在发布模式下编译我的项目失败:

...
[proguard] Note: duplicate definition of library class [com.koushikdutta.async.wrapper.DataEmitterWrapper]
[proguard] Reading library jar [C:\old c Program Files\android-sdk\platforms\android-16\android.jar]
[proguard] Note: there were 474 duplicate class definitions.
[proguard] Initializing...
[proguard] Warning: com.koushikdutta.async.http.AsyncHttpClient: can't find referenced method 'java.lang.String getHostString()' in class java.net.InetSocketAddress
[proguard] Warning: com.koushikdutta.async.http.spdy.Spdy3$Writer: can't find referenced method 'int deflate(byte[],int,int,int)' in class java.util.zip.Deflater
[proguard] Warning: there were 2 unresolved references to program class members.
[proguard]          Your input classes appear to be inconsistent.
[proguard]          You may need to recompile them and try again.
[proguard]          Alternatively, you may have to specify the option 
[proguard]          '-dontskipnonpubliclibraryclassmembers'.

我将 -libraryjars libs/androidasync-2.1.6.jar 添加到 proguard-project.txt,但这并没有解决问题。

【问题讨论】:

    标签: android proguard android-proguard


    【解决方案1】:

    显然通过在 proguard-project.txt 中添加以下行来解决:

    -dontwarn com.koushikdutta.**
    

    【讨论】:

      猜你喜欢
      • 2020-09-14
      • 2011-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多