使用导出签名的应用程序android构建apk时出现Proguard错误

时间:2014-01-13 21:45:10

标签: android

 Proguard returned with error code 1. See console
 Warning: com.emilsjolander.components.stickylistheaders.StickyListHeadersListView: can't find referenced method 'int getLayoutDirection()' in class com.emilsjolander.components.stickylistheaders.StickyListHeadersListView
 Warning: com.emilsjolander.components.stickylistheaders.StickyListHeadersListView: can't find referenced method 'void setLayoutDirection(int)' in class android.view.View
       You should check if you need to specify additional program jars.
 Warning: there were 2 unresolved references to program class members.
          Your input classes appear to be inconsistent.
          You may need to recompile them and try again.
          Alternatively, you may have to specify the option 
          '-dontskipnonpubliclibraryclassmembers'.
 java.io.IOException: Please correct the above warnings first.
    at proguard.Initializer.execute(Initializer.java:321)
    at proguard.ProGuard.initialize(ProGuard.java:211)
    at proguard.ProGuard.execute(ProGuard.java:86)
    at proguard.ProGuard.main(ProGuard.java:492)

在android中的Proguard问题,无法构建apk的生产版本,但能够在设备上运行,但是当导出为已签名的应用程序时,给我提出问题

1 个答案:

答案 0 :(得分:4)

您需要使用以下行更新proguard配置:

-keep class se.emilsjolander.** { *; } -dontwarn se.emilsjolander.**

希望有所帮助。