从APK启动时,MobileFirst 8应用程序中断

时间:2018-01-26 13:41:17

标签: android ionic-framework ibm-mobilefirst

当我为MobileFirst 8构建Ionicv1应用程序并在Android 4.4.2上运行时,它给了我这个错误:

01-26 10:03:32.615 17270-17270/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.ionicframework.plutal594637, PID: 17270 java.lang.RuntimeException: Unable to create application com.ibm.MFPApplication: java.lang.IllegalStateException: Unable to extract the trust manager on a.a.f.a@41cadd88, sslSocketFactory is class com.worklight.wlclient.f at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4544) at android.app.ActivityThread.access$1500(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5292) 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:824) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: Unable to extract the trust manager on a.a.f.a@41cadd88, 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:1007) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4541) at android.app.ActivityThread.access$1500(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5292) 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:824) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) at dalvik.system.NativeStart.main(Native Method)

当我启动它进行调试(ionic run android)时,它正常工作,但是当我从构建APK运行它时,它不正常。

1 个答案:

答案 0 :(得分:1)

也许为时已晚,但万一您仍然需要它...我遇到了同样的问题,@ manjunath kallannavar给了我解决方案...

首先,您需要使用Android ProGuard工具来混淆您的应用。

更多信息:

但是,对于此特定问题,您需要添加以下行:

-keepclassmembers class * implements javax.net.ssl.SSLSocketFactory {
   private  javax.net.ssl.SSLSocketFactory delegate;
}