2013-12-16 54 views
1

我已经产生一个具有proguard的APK文件,但是当我试图与蔚蓝的连接它给一些例外使用ProGuard

回答

0

我已经加入-keepattributes Signature,*Annotation*,EnclosingMethod我proguard的 做工精细

0

尝试添加类的例外在你的jar文件的Android的.apk保护。比如我用roboguice所以我加了这一点:

# Keep the classes in the external jars 
-keep class com.google.inject.** { *; } 
-keep class javax.inject.** { *; } 
-keep class javax.annotation.** { *; } 
-keep class roboguice.** { *; } 

我还用XStream的所以在我的ProGuard-project.txt我没有加入如下:

#Keep the classes for XStream jar 
-keep class com.thoughtworks.xstream.converters.extended.SubjectConverter { *; } 
-keep class com.thoughtworks.xstream.converters.extended.ThrowableConverter { *; } 
-keep class com.thoughtworks.xstream.converters.extended.StackTraceElementConverter { *; } 
-keep class com.thoughtworks.xstream.converters.extended.CurrencyConverter { *; } 
-keep class com.thoughtworks.xstream.converters.extended.RegexPatternConverter { *; } 
-keep class com.thoughtworks.xstream.converters.extended.CharsetConverter { *; } 
-keep class com.thoughtworks.xstream.annotations.** { *; } 

所以,我会尝试是要补充的是,jar文件提供给您的类

+0

对不起,我没有得到你this.Can给我一个例子吗? – Comrade

+0

我编辑我的回复,使其更清晰 –

+0

无法正常工作..我已添加像这样-keep class com.microsoft.windowsazure.mobileservices.MobileServiceClient {*; } -keep class com.microsoft.windowsazure.mobileservices.MobileServiceTable {*; } -keep class com.microsoft.windowsazure.mobileservices.ServiceFilterResponse {*; } -keep class com.microsoft.windowsazure.mobileservices.TableOperationCallback {*; } -keep class com.microsoft.windowsazure.mobileservices.TableQueryCallback {*; } -keep class com.microsoft.windowsazure.mobileservices。** {*; } – Comrade