4

I received this exception on release build with Android 12.

exception.class.missing._Unknown_: java.lang.AbstractMethodError    abstract method "void android.content.pm.PackageManager$OnChecksumsReadyListener.onChecksumsReady(java.util.List)"
  at android.app.ApplicationPackageManager$2.onChecksumsReady (ApplicationPackageManager.java:969)
  at android.content.pm.IOnChecksumsReadyListener$Stub.onTransact (IOnChecksumsReadyListener.java:87)
  at android.os.Binder.execTransactInternal (Binder.java:1184)
  at android.os.Binder.execTransact (Binder.java:1143)

Anyone knows reason behind this? or How to fix this issue!?

Bhoomika Patel
  • 1,895
  • 1
  • 13
  • 30
  • Did you tried cleaning the project? – Abhishek Dutt Jul 12 '22 at 04:40
  • This issue occurs on release build – Bhoomika Patel Jul 12 '22 at 04:42
  • My bad. Did it worked on the debug branch? – Abhishek Dutt Jul 12 '22 at 04:45
  • Ran into this exception on a test S22 and an in-production POCO F4 phone. This is a Unity project but I don't think it matters. The S22 was straight out of the box with the factory Android version. Same thing after updating to the August security patch. I left it alone overnight and this morning the exception is gone. I believe there was a library mismatch on the phone and it updated itself overnight. – ADB Sep 28 '22 at 18:42

2 Answers2

0

Related to the common AbstractMethodError, you can get more information from this topic: https://stackoverflow.com/a/17970129/19303683

In my case, i get this problem when i try to downgrade target sdk to 30. My solution is:

  • Find all dependencies related to work-runtime (such as firebase ads) using Gradlew and downgrade them.

  • Remove this code from gradle if you have:

    configurations.all {resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }}

ryak
  • 1
  • 1
0

I was receiving the very same error when AdMob's InterstitialAd.load() was called on an Android 12 device that had no Google Play Services installed (Lineage OS 19). It was happening on app's release build, debug build was running without any problems. Exception could not be caught.

What solved problem in my case was upgrading gradle plugin to version 7.3.1. As a side consequence, my APK got extra 4MB as well.

Viktor Brešan
  • 5,293
  • 5
  • 33
  • 36