我有一个使用ionic v.1.x开发的应用程序,并且已与Mobile First 8集成。
当我安装调试版本时,一切正常,但是生成了发行版本,安装它会崩溃。
我遇到以下错误:
Process: {APP_ID}, PID: 20565
java.lang.RuntimeException: Unable to create application com.ibm.MFPApplication: java.lang.IllegalStateException: Unable to extract the trust manager on a.a.f.a@42a0f068, sslSocketFactory is class com.worklight.wlclient.f
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4715)
at android.app.ActivityThread.access$1600(ActivityThread.java:173)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5579)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Unable to extract the trust manager on a.a.f.a@42a0f068, sslSocketFactory is class com.worklight.wlclient.f
at a.v$a.a(SourceFile:599)
at com.worklight.wlclient.c.<init>(SourceFile:76)
at com.worklight.wlclient.c.a(SourceFile:246)
at com.worklight.wlclient.a.f.a(SourceFile:181)
at com.worklight.common.a.a(SourceFile:545)
at com.worklight.androidgap.b.a.<init>(SourceFile:54)
at com.worklight.androidgap.b.a.a(SourceFile:85)
at com.ibm.MFPApplication.onCreate(SourceFile:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4712)
... 10 more
Force finishing activity {APP_ID}/.MainActivity
我看到另一个人也遇到了同样的问题,但是他的解决方案是安装6.2 Cordova版本...我尝试了这一操作,但收到以下错误消息:
Error: cordovaProject.projectConfig.getFileResources is not a function
答案 0 :(得分:4)
在proguard-project.txt或proguard-rules.pro文件中添加以下规则
-keepclassmembers class * implements javax.net.ssl.SSLSocketFactory {
private javax.net.ssl.SSLSocketFactory delegate;
}
有关更多信息:
Obfuscating Android code using Proguard in MobileFirst Foundation 8.0