(Proguard)服务器构建错误代号1

时间:2018-04-17 18:30:21

标签: parse-platform codenameone parse4cn1

在我的项目中添加Android证书后,Codename One服务器开始出现构建问题,然后通过询问Codename One支持,他们告诉我它可能与Proguard有关,所以在通过设置{禁用Proguard后{1}}哪个不推荐对吗?因此,在执行它之后,Codename One服务器构建正常,但我想保持Proguard启用,因为它是推荐的,但是当我保持启用它时,Codename One服务器会出现构建错误,并显示以下错误日志:{{3 }}

此外,我使用的唯一库是: android.enableProguard=falsecn1-codescan.cn1libCN1JSON.cn1lib

我是否错过了Proguard构建提示?我使用了以下Proguard构建提示:

parse4cn1.cn1lib

1 个答案:

答案 0 :(得分:1)

您需要将单词ProblemClass替换为导致问题的类的完整路径...

你写了这个:

android.proguardKeep=-keep class com.mypackage.ProblemClass { *; } -keep class android.support.v4.** { *; } -keep class android.support.v7.** { *; } -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.app.Activity -keep public class * extends android.preference.Preference -keep public class com.freshdesk.mobihelp.exception.MobihelpComponentNotFoundException -keepclassmembers class * implements android.os.Parcelable {   public static final android.os.Parcelable$Creator *; }

你应该为com.parse.ParseOkHttpClient

写这个
android.proguardKeep=-keep class com.parse.ParseOkHttpClient { *; } -keep class android.support.v4.** { *; } -keep class android.support.v7.** { *; } -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.app.Activity -keep public class * extends android.preference.Preference -keep public class com.freshdesk.mobihelp.exception.MobihelpComponentNotFoundException -keepclassmembers class * implements android.os.Parcelable {   public static final android.os.Parcelable$Creator *; }