(Proguard) 服务器构建错误代号一 [英] (Proguard) Server Build Error Codename One
问题描述
在我的项目中添加 Android 证书后,Codename One 服务器开始出现问题,然后通过询问 Codename One 支持,他们告诉我这可能与 Proguard 相关,因此在通过设置禁用 Proguard 后 android.enableProguard=false
这是不推荐的吧?因此,在执行此操作后,Codename One 服务器构建良好,但我想保持 Proguard 启用,因为它是推荐的,但是当我保持启用它时,Codename One 服务器出现构建错误,并显示以下错误日志:https://s3.amazonones.com-响应/d5f3c0c7-71a3-4a17-9f19-1c4e8fb3903d-1523988845519-error.txt
After adding an Android Certificate in my project, the Codename One server started getting issues to build, then by asking the Codename One support, they told me it could be something related to the Proguard, so after disabling the Proguard by setting android.enableProguard=false
which is not recommended right? So after doing it the Codename One server builds fine, but I want to keep the Proguard enable since it's the recommeded, but when I keep it enable the Codename One server gets build error with the following error log: https://s3.amazonaws.com/codenameone-build-response/d5f3c0c7-71a3-4a17-9f19-1c4e8fb3903d-1523988845519-error.txt
此外,我使用的唯一库是:cn1-codescan.cn1lib
、CN1JSON.cn1lib
和 parse4cn1.cn1lib
In addition the only libraries I'm using are:
cn1-codescan.cn1lib
, CN1JSON.cn1lib
and parse4cn1.cn1lib
我是否缺少 Proguard 构建提示?我正在使用以下 Proguard 构建提示:
Am I missing Proguard build hints? I'm using the following Proguard build hints:
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 *; }
推荐答案
您需要将单词 ProblemClass
替换为导致问题的类的完整路径...
You need to replace the word ProblemClass
with the full path to the class that is causing the problem...
你写的:
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
编写此代码:
You should have written this for 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 *; }
这篇关于(Proguard) 服务器构建错误代号一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!