首页 / 浏览问题 / 移动GIS / 问题详情
SuperMap imobile中三维AR示例无法运行
6EXP 2020年05月14日
使用产品:supermap-imobile-10.0.1-189-android-zip-chs 操作系统:win10 x64

错误如下:

E/LogInfoService: Get VideoList Request Failed....
E/es.java.helloa: No implementation found for long com.google.ar.core.Session.nativeCreateSession(android.content.Context) (tried Java_com_google_ar_core_Session_nativeCreateSession and Java_com_google_ar_core_Session_nativeCreateSession__Landroid_content_Context_2)
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.google.ar.core.examples.java.helloar, PID: 31676
    java.lang.UnsatisfiedLinkError: No implementation found for long com.google.ar.core.Session.nativeCreateSession(android.content.Context) (tried Java_com_google_ar_core_Session_nativeCreateSession and Java_com_google_ar_core_Session_nativeCreateSession__Landroid_content_Context_2)
        at com.google.ar.core.Session.nativeCreateSession(Native Method)
        at com.google.ar.core.Session.<init>(Unknown Source:21)
        at com.supermap.realspace.SceneControl.initSession(SceneControl.java:834)
        at com.supermap.realspace.ARControl.<init>(ARControl.java:42)
        at com.google.ar.core.supermap.java.ar.ARActivity.onCreate(ARActivity.java:100)

这个错误出在:arControl=new ARControl(this,sceneControl);上。

手机环境应该没有问题,红米note7pro,已安装谷歌全家桶+GoogleARCore,并且可以运行如ARuler一类的需要GoogleAR Core的应用。

曾试着提升一下implementation的Google ar core的版本到1.16.0,出现了新错误:

UpdatedBugFixes on CameraConfigManagerUpdated is unimplemented!

1个回答

您好,针对您的问题描述,麻烦确认以下问题:
1.在应用市场下载app SuperMap AR,看能否在手机上正常运行。
2.目前sdk所支持的ar core版本可以是1.11或者1.9,尽量不要使用高版本的ar core
3.在AndroidMainfest.xml文件的application节点下是否加上

<meta-data android:name="com.google.ar.core" android:value="required" />
9,137EXP 2020年05月15日

你好,我试着将ar core版本切换到了1.9,新的错误如下:

E/native: motion_tracking_context.cc:1036 Unable to find measurements corresponding to vio status at timestamp 59976401002833.
W/native: pose_manager.cc:55 GetRecentDevicePose failed. INVALID_ARGUMENT: Passed timestamp is too new. Latest VIO t: -1ns, latest IMU t: 16h39m36.4740264s, query t:16h39m36.567563302s
W/native: imu_integrator_utils.cc:39 Gyro samples do not cover << [ 59976401002833 ; 59976500939083 ] nanosecond. Use identity R. Gyro samples cover [ 59976005233275 ; 59976498700124 ] nanosecond.
I/native: distribute.cc:79 No keypoints to prune.
W/native: pose_manager.cc:55 GetRecentDevicePose failed. INVALID_ARGUMENT: Passed timestamp is too new. Latest VIO t: -1ns, latest IMU t: 16h39m36.518438822s, query t:16h39m36.600875385s
W/native: ransac.cc:696 Exiting without computing LS fit after RANSAC, as minimum of 2 pts are required.
W/native: ransac.cc:696 Exiting without computing LS fit after RANSAC, as minimum of 2 pts are required.

这几句不断地重复,且程序获取不到摄像机,不过可以看见三个seekbar。

之后切换Google core到1.11版本,出现了另外的错误:

D/ACameraDevice: Device error received, code 3, frame number 84, request ID 0, subseq ID 0
E/native: android_camera.cc:1708 Camera 0: Repeating CaptureRequest capture failed! frame: 84 reason: 1

这两句不断地重复,但是很神奇的是AR功能可以用了

但我发现了另外的问题:我从三维场景(通过sceneControl显示模型)通过按钮开启AR场景的时候是是用不AR的,只会黑屏。但是当我从主界面底栏fragment通过按钮调用AR场景的activity的时候却可以正常使用。

这是否因为在三维场景切换的时候没有正确释放一些资源导致的?(因为我的确没有手动释放任何资源)

你好!请问为什么仿照官方示例通过mainActivity按钮开启ARactivity之后回退,第二次开启的时候会闪退回mainActivity,然后第三次又可以正常开启ARactivity。。
您好,解决方法如下:
1.设置ARActivity的启动模式为singleInstance
2.然后在ARActivity的finish方法中加上这句代码:moveTaskToBack(true);
您好,解决方法如下:
1.设置ARActivity的启动模式为singleInstance
2.然后在ARActivity的finish方法中加上这句代码:moveTaskToBack(true); 我这边设置完之后也不行
...