29

I wanted to update the version of the application in the Play Store, but in the tests I started getting this error.

Superclass androidx.core.app.f of androidx.activity.ComponentActivity is declared final

According to the google issues tracker this is new, maybe someone has a solution to this problem.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Paul Maltsev
  • 452
  • 1
  • 5
  • 14

7 Answers7

8

I added

-keep class androidx.core.app.** { *; }

In the proguard rules to solve the issue.

Edit: minus sign (-) needs to be before the line

Talu
  • 185
  • 2
  • 7
Fabio Fracassi
  • 289
  • 3
  • 7
2

On 27.07.2022 Google team members posted that the bug has been fixed. and on 09.08.2022 they added some explanation that you can find in this link.

In two words: In pre-launch testing app-crawler apk and the app apk generated different ‘keep rules’ for shrunk. This will cause ‘no such method’ or ‘superclass will be declared final’.

Paul Maltsev
  • 452
  • 1
  • 5
  • 14
1

Did you upgrade some libraries in your build.gradle?

Coroutines maybe?

We have this exception reported too and it has the same stack trace as an older exception we had before, so possibly equally related to the Kotlin coroutines lib version:

java.lang.VerifyError: Verifier rejected class. Code working fine in debug mode, but not throwing this error in release mode

S01ds
  • 301
  • 5
  • 8
  • HI, not I didn't update gradle or coroutines. On all local devices it works fine, but on google test devices it crashes. Also according to firebase-crashlytics it crashed several times while google testing. – Paul Maltsev Jul 05 '22 at 06:07
1

You try update implementation 'com.google.android.gms' in build.gradle to lastest version

1

I had the same issue with Flutter. I remove Firebase from build.gradle

// implementation platform('com.google.firebase:firebase-bom:29.0.4')

also downgrading firebase to 29.0.2 is working too.

1

I added this line into gradle.properties

android.enableR8.fullMode=true

I hope it will help you too

0

For builds made before August 2022

If your APK/App Boundle was created before August 2022, the issue might be related to an internal issue by Google.

See this issue tracker: https://issuetracker.google.com/issues/237785592?pli=1

For me it was enough to build a new release on my machine (increasing version number at least by 1!) and upload it... Afterwards, the problem was gone.

deczaloth
  • 7,094
  • 4
  • 24
  • 59