尝试导出未签名的Android应用程序后发生致命错误

时间:2013-05-17 10:41:29

标签: android eclipse proguard

我尝试从Eclipse导出未签名的应用程序以获取发布文件,它不断向我Fatal Error Code 1提供这些详细信息:

P.S我们使用Twitter4J库,而我们不使用与Facebook相关的任何内容。

[2013-05-17 13:16:07 - Faltirha] Proguard returned with error code 1. See console
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.auth.FacebookAuthenticationProvider$1: can't find superclass or interface com.facebook.android.Facebook$ServiceListener
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.auth.FacebookAuthenticationProvider$2: can't find superclass or interface com.facebook.Session$StatusCallback
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.auth.FacebookAuthenticationProvider$2$1: can't find superclass or interface com.facebook.Request$Callback
[2013-05-17 13:16:07 - Faltirha] Warning: twitter4j.management.APIStatisticsOpenMBean: can't find superclass or interface javax.management.DynamicMBean
[2013-05-17 13:16:07 - Faltirha] Warning: com.google.android.gms.internal.bn$b: can't find referenced method 'android.view.Display getDisplay()' in class android.view.View
[2013-05-17 13:16:07 - Faltirha] Warning: com.google.android.gms.internal.bn$b: can't find referenced method 'void removeOnGlobalLayoutListener(android.view.ViewTreeObserver$OnGlobalLayoutListener)' in class android.view.ViewTreeObserver
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook
[2013-05-17 13:16:07 - Faltirha] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session

......

[2013-05-17 13:16:07 - Faltirha]       You should check if you need to specify additional program jars.
[2013-05-17 13:16:07 - Faltirha] Warning: there were 203 unresolved references to classes or interfaces.
[2013-05-17 13:16:07 - Faltirha]          You may need to specify additional library jars (using '-libraryjars').
[2013-05-17 13:16:07 - Faltirha] Warning: there were 2 unresolved references to program class members.
[2013-05-17 13:16:07 - Faltirha]          Your input classes appear to be inconsistent.
[2013-05-17 13:16:07 - Faltirha]          You may need to recompile them and try again.
[2013-05-17 13:16:07 - Faltirha]          Alternatively, you may have to specify the option 
[2013-05-17 13:16:07 - Faltirha]          '-dontskipnonpubliclibraryclassmembers'.
[2013-05-17 13:16:07 - Faltirha] java.io.IOException: Please correct the above warnings first.
[2013-05-17 13:16:07 - Faltirha]    at proguard.Initializer.execute(Initializer.java:321)
[2013-05-17 13:16:07 - Faltirha]    at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-05-17 13:16:07 - Faltirha]    at proguard.ProGuard.execute(ProGuard.java:86)
[2013-05-17 13:16:07 - Faltirha]    at proguard.ProGuard.main(ProGuard.java:492)

修改  我可以通过在项目属性文件

中注释来导出未签名的应用程序
  

proguard.config = $ {sdk.dir} /tools/proguard/proguard-android.txt:proguard-project .TXT:proguard的-谷歌-API-client.txt

但我认为这不是解决方案!

3 个答案:

答案 0 :(得分:5)

我能够通过添加行

来克服这个问题
-dontwarn com.google.android.gms.**

到我的proguard-project.txt文件。

答案 1 :(得分:0)

我能够通过在项目属性文件

中注释这个(下面)来导出未签名的应用程序
  

proguard.config = $ {sdk.dir} /tools/proguard/proguard-android.txt:proguard-project .TXT:proguard的-谷歌-API-client.txt

但我认为这不是正确的解决方案!

答案 2 :(得分:0)

不,解决方案不是在项目属性文件中注释它,除非你不关心加密你的apk。如果您不在乎有人解密您的代码,请继续将其从项目属性文件中删除。