该问题已解决:发现是试用许可过期了,重新申请下载了新证书,问题解决。
使用产品:iMobile 11i 操作系统:win10 x64
问题描述:之前使用一切正常,用的是试用版的证书,还没到期,因为使用同一证书的ios设备没问题。代码确认没有改动,突然打开报错了,如下:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/supermap/bslicense/BsLicense;
at com.supermap.data.PrivateCloudLicenseManager.<init>(PrivateCloudLicenseManager.java:31)
at com.supermap.data.PrivateCloudLicenseManager.getInstance(PrivateCloudLicenseManager.java:49)
at com.supermap.data.DatasourcesNative.isCloudValid(DatasourcesNative.java:46)
at com.supermap.data.DatasourcesNative.jni_Open(Native Method)
at com.supermap.data.Datasources.open(Datasources.java:234)
at com.css.dzypg.maplib.MapActivity.initMap(MapActivity.kt:104)
at com.css.dzypg.maplib.BaseMapActivity.onCreate(BaseMapActivity.kt:47)
at android.app.Activity.performCreate(Activity.java:8214)
at android.app.Activity.performCreate(Activity.java:8202)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4033)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4247)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.supermap.bslicense.BsLicense" on path: DexPathList[[zip file "/data/app/com.horitech.cn-zAvU7iN1TyuNg2IN1UmQVw==/base.apk"],nativeLibraryDirectories=[/data/app/com.horitech.cn-zAvU7iN1TyuNg2IN1UmQVw==/lib/arm64, /data/app/com.horitech.cn-zAvU7iN1TyuNg2IN1UmQVw==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:209)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.supermap.data.PrivateCloudLicenseManager.<init>(PrivateCloudLicenseManager.java:31)
at com.supermap.data.PrivateCloudLicenseManager.getInstance(PrivateCloudLicenseManager.java:49)
at com.supermap.data.DatasourcesNative.isCloudValid(DatasourcesNative.java:46)
at com.supermap.data.DatasourcesNative.jni_Open(Native Method)
at com.supermap.data.Datasources.open(Datasources.java:234)
at com.css.dzypg.maplib.MapActivity.initMap(MapActivity.kt:104)
at com.css.dzypg.maplib.BaseMapActivity.onCreate(BaseMapActivity.kt:47)
at android.app.Activity.performCreate(Activity.java:8214)
at android.app.Activity.performCreate(Activity.java:8202)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4033)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4247)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
看了论坛其他的类似问题,导入了slf4j-api-1.7.26.jar、slf4j-log4j12-1.7.26.jar、log4j-1.2.17.jar包,崩溃信息变为:
java.lang.NullPointerException: workspace.datasources.open(dinfo) must not be null
at top.luangun.testapp.MapFragment.onCreateView(MapFragment.kt:39)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:518)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
请问是什么原因?谢谢!