Start a new topic

Android crash due to "No virtual method setLightEstimationMode"

Hi,

I'm trying to implement the InstantScenePickingActivity sample into my existing project, where I have used ARCore before. Now, as soon as the InstantScenePickingActivity is launched, the app crashes due to:


E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.snapandtrack, PID: 3859
    java.lang.NoSuchMethodError: No virtual method setLightEstimationMode(Lcom/google/ar/core/Config$LightEstimationMode;)V in class Lcom/google/ar/core/Config; or its super classes (declaration of 'com.google.ar.core.Config' appears in /data/app/com.snapandtrack-6Xts_2nhfQog8FfEtbUYww==/base.apk)
        at com.wikitude.common.arcore.internal.d.m(Unknown Source:9)
        at com.wikitude.common.arcore.internal.d.a(Unknown Source:36)
        at com.wikitude.common.arcore.internal.NativeArCoreInterface.start(Unknown Source:2)
        at com.wikitude.common.camera.internal.NativeCameraInterface.nativeCameraReleased(Native Method)
        at com.wikitude.common.camera.internal.NativeCameraInterface.b(Unknown Source:2)
        at com.wikitude.common.camera.internal.h.l(Unknown Source:57)
        at com.wikitude.common.camera.internal.e.b(Unknown Source:10)
        at com.wikitude.common.camera.internal.NativeCameraInterface.doStop(Unknown Source:2)
        at com.wikitude.common.camera.internal.NativeCameraInterface.nativeCameraOpened(Native Method)
        at com.wikitude.common.camera.internal.NativeCameraInterface.a(Unknown Source:2)
        at com.wikitude.common.camera.internal.h$2$1.run(Unknown Source:8)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7037)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)


I have tried to make everything match the sample, but the app keeps crashing.


Hope you can help.

Thank you and kind regards,

Alexander


Hi Alexander,


We had a user reporting the same error in our Xamarin extension 2 months ago: https://support.wikitude.com/support/discussions/topics/5000092565.


The problem could come from one of the dependencies of your project that requires an AR Core version higher that 1.5, which we do not support yet.


Try to check the AR Core version of your dependencies and your device and remove it if needed.


Regards,


Aitor Font.

Creating an InstantTracker with configuration.setSMARTEnabled(false) works though.

Hi,


Can you please provide the following details:


  • Which version of the SDK are you using?
  • Are you using any of our Extensions (Cordova, Xamarin, Unity)? If yes, which version are you using?
  • What device does this happen with (model details and OS version)?
  • Is this happening with the sample app or in your own app? If it happens with your own app, does the unchanged sample app work on your device?

Thx and greetings

Nicola

Hi,

I'm using Android Native SDK 8.9.0 without any other extensions.

It happens on my Samsung Galaxy S10e running Android 9. But the sample app works fine on that device.

Once I try to implement it into my own app, it crashes.

Previously I was using ARCore and now I want to switch to Wikitude SDK in my app. The thing is, when I create a InstantTracker with SMART set to disabled, the InstantScenePickingActivity in my own app launches. But I made sure that I'm not using ARCore or anything before creating the InstantScenePickingActivity.

Login or Signup to post a comment