社区的大伙好,
使用产品:supermap-imobile-10.2.1-228-android-zip-chs
10i 操作系统:mac 10.15.15
Android studio :2022.03.01 北极狐
gradle 版本:5.6.4
gradle Android plugin 版本: 'com.android.tools.build:gradle:3.6.0'
导入的 so 库 和 jar 包 :来源下载的 lib 目录下
测试机:vivo IQOO ,Android 11
我运行在官网下载 supermap-imobile-10.2.1-228-android-zip-chs 包的 iMobileAR ,程序闪退,logcat 报错如下:
2022-03-22 15:23:14.792 9374-9374/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.supermap.imobile.myapplication, PID: 9374
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.supermap.imobile.myapplication/com.supermap.imobile.myapplication.MainActivity}: java.lang.IllegalArgumentException: so库和jar包版本不匹配
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3754)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3912)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2319)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:257)
at android.app.ActivityThread.main(ActivityThread.java:8222)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1015)
Caused by: java.lang.IllegalArgumentException: so库和jar包版本不匹配
at com.supermap.data.Environment.checkAndLoadLibrary64(Environment.java:1810)
at com.supermap.data.Environment.initialization(Environment.java:587)
at com.supermap.imobile.myapplication.MainActivity.onCreate(MainActivity.java:54)
at android.app.Activity.performCreate(Activity.java:8119)
at android.app.Activity.performCreate(Activity.java:8103)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1359)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3727)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3912)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2319)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:257)
at android.app.ActivityThread.main(ActivityThread.java:8222)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1015)
我也尝试了卸载重装,以及能确定导入的so/jar 无误,而且gradle 版本降低的话,Androidstudio 就提示不能使用编译 ARCore
麻烦大伙解答下,万分感激。