I'm trying to learn Augmented Reality Programming in Kotlin. I decided to give sceneform animations a shot. Basic examples seemed to work as expected until I decided to add animations to the mix. The app seems to crash at startup with the error "java.lang.NoSuchMethodError: No virtual method setUpdateMode(Lcom/google/ar/core/Config$UpdateMode;)V in class Lcom/google/ar/core/Config; or its super classes (declaration of 'com.google.ar.core.Config' appears in /data/app/com.thyagash.hellosceneform-_6rmQhoIu940ZX2hnqARzQ==/base.apk!classes3.dex)". Not sure how to proceed
I'm a beginner with sceneform animations and Kotlin in general, but I've tried going through the java code as per the LOGCAT output. I have extended the ArFragment base class to try and set the update mode myself, even though that seemed rather unnecessary. Didn't work. I followed the sample at https://github.com/google-ar/sceneform-android-sdk/tree/master/samples/animation which works fine
How does one go about debugging such issues? Is there anything I'm missing here?
build.gradle
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.afollestad.material-dialogs:core:3.0.0-rc3'
implementation 'com.afollestad.material-dialogs:bottomsheets:3.0.0-rc3'
// Provides ArFragment, and other Sceneform UX resources:
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.9.0"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation "com.google.ar.sceneform:animation:1.10.0"
App crashes immediately on startup with the following messages at LOGCAT:
2019-06-29 19:55:53.158 3886-3886/com.thyagash.hellosceneform E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.thyagash.hellosceneform, PID: 3886
java.lang.NoSuchMethodError: No virtual method setUpdateMode(Lcom/google/ar/core/Config$UpdateMode;)V in class Lcom/google/ar/core/Config; or its super classes (declaration of 'com.google.ar.core.Config' appears in /data/app/com.thyagash.hellosceneform-_6rmQhoIu940ZX2hnqARzQ==/base.apk!classes3.dex)
at com.google.ar.sceneform.ux.BaseArFragment.initializeSession(BaseArFragment.java:349)
at com.google.ar.sceneform.ux.BaseArFragment.onResume(BaseArFragment.java:311)
at androidx.fragment.app.Fragment.performResume(Fragment.java:2498)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1501)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
at androidx.fragment.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:3241)
at androidx.fragment.app.FragmentController.dispatchResume(FragmentController.java:223)
at androidx.fragment.app.FragmentActivity.onResumeFragments(FragmentActivity.java:538)
at androidx.fragment.app.FragmentActivity.onPostResume(FragmentActivity.java:527)
at androidx.appcompat.app.AppCompatActivity.onPostResume(AppCompatActivity.java:172)
at android.app.Activity.performResume(Activity.java:7336)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3953)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3993)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1934)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)