Orton
Orton

Reputation: 161

Getting Crash in InApp Update when migrating from Play Core Library

We're migrating from com.google.android.play:core:1.10.3 to new approach as mentioned in this migration guide - https://developer.android.com/guide/playcore#groovy . However, after following the steps as mentioned in the doc, app is getting crashed when launching it.

Crash Logs are as below -

java.lang.NoSuchMethodError: No interface method getAppUpdateInfo()Lcom/google/android/play/core/tasks/Task; 
in class Lcom/google/android/play/core/appupdate/AppUpdateManager; or its super classes 
(declaration of 'com.google.android.play.core.appupdate.AppUpdateManager' appears in 
/data/app/~~aDy2HTRM_e1Hy6YWUAl7FA==/com.et.epaper-uBsx8lP3gN-by8Jo1VJufg==/base.apk!classes19.dex)
    at com.x.x.xx.XActivity.checkForAppUpdate(XActivity.kt:400)
    at com.x.x.xx.XActivity.onCreate(XActivity.kt:257)
    at android.app.Activity.performCreate(Activity.java:8595)
    at android.app.Activity.performCreate(Activity.java:8573)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3764)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8177)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

Below are the new dependencies we're using in our App's Build.gradle file -

implementation 'com.google.android.play:app-update-ktx:2.1.0'

In the migration guide, it is mentioned that there's change in dependencies only and no code level changes. We have also compared our existing code for InApp update with the new code and it is same.

Any help is appreciated.

Upvotes: 0

Views: 271

Answers (1)

gtxtreme
gtxtreme

Reputation: 3606

Did you perform the Common Migration Steps

After that it should work

Upvotes: 0

Related Questions