(Proguard)服务器构建错误代号为一 [英] (Proguard) Server Build Error Codename One

查看:86
本文介绍了(Proguard)服务器构建错误代号为一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中添加了Android证书后,Codename One服务器开始构建问题,然后通过询问Codename One支持,他们告诉我这可能与Proguard有关,因此在通过设置android.enableProguard=false不推荐使用哪个对不对?因此,在完成此操作后,Codename One服务器可以正常运行,但是我希望保留Proguard启用,因为它是推荐的,但是当我保持启用状态时,Codename One服务器将生成带有以下错误日志的错误:

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.cn1libCN1JSON.cn1libparse4cn1.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编写此代码:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆