jux_97
jux_97

Reputation: 462

Flutter app crashes on startup on Android 12

I have published an app on Google Play and it is being used regularly. In the last update, I have released updated both, compileSdkVersion and targetSdkVersion to 31.

I have seen that users with an Android version less than 12 do not have any issues with the app, while those with an Android version 12 are facing an app crash whenever they try to open the app.

This is the message I get from Google Play Store:

enter image description here

Did anyone face a similar problem? Would appreciate any suggestion!

Upvotes: 7

Views: 12844

Answers (3)

ncutixavier
ncutixavier

Reputation: 651

I think you need to work permission handler. Check this https://pub.dev/packages/permission_handler

Upvotes: 0

Pranav
Pranav

Reputation: 3

try to implement firebase_crashlytics in your project. It will give you a better idea of why your app is crashing!!!

Upvotes: -6

jux_97
jux_97

Reputation: 462

I have resolved the issue. Here is what I did:

  1. I have added android:exported="true" in my AndroidManifest.xml to all activities, services, or broadcast receivers that use intent filters
  2. I have added implementation 'androidx.work:work-runtime-ktx:2.7.0' in the dependencies section of my app level build.gradle (android/app/build.gradle)

After that my app was working regularly on Android 12 and these changes did not affect the lower Android versions

Upvotes: 28

Related Questions