Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App is crashing after updating targetsdkversion to 34 #480

Open
Sunilk047 opened this issue Sep 14, 2024 · 1 comment
Open

App is crashing after updating targetsdkversion to 34 #480

Sunilk047 opened this issue Sep 14, 2024 · 1 comment

Comments

@Sunilk047
Copy link

No description provided.

@pratikcronabit
Copy link

I have one solution.

1)- Please make sure your project already use the version of gradle tools below:

in android/build.gradle classpath 'com.android.tools.build:gradle:7.4.2'
in android/build.gradle ext.kotlin_version = '1.8.10'
in android/gradle/wrapper/gradle-wrapper.properties distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip

2)- Add the corresponding permission to your android/app/src/main/AndroidManifest.xml file:

Add Permission

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_..." />

Ex.. :-, if you picked 'location', use 'android.permission.FOREGROUND_SERVICE_LOCATION' ............Read more https://developer.android.com/about/versions/14/changes/fgs-types-required

    <service
        android:name="id.flutter.flutter_background_service.BackgroundService"
        android:foregroundServiceType="WhatForegroundServiceTypeDoYouWant"
    />

That is work for me.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants