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

Build / sharing does not work targeting Android 31+ #40

Open
creativecreatorormaybenot opened this issue Mar 14, 2022 · 1 comment · May be fixed by #50
Open

Build / sharing does not work targeting Android 31+ #40

creativecreatorormaybenot opened this issue Mar 14, 2022 · 1 comment · May be fixed by #50

Comments

@creativecreatorormaybenot
Copy link

creativecreatorormaybenot commented Mar 14, 2022

When following the Android installation guide and running on a Pixel 6, the following installation error is thrown:

adb: failed to install app.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during
installPackageLI: /data/app/vmdl1231205057.tmp/base.apk (at Binary XML file line #68): com.snapchat.kit.sdk.SnapKitActivity: Targeting S+ (version 31 and above) requires that an explicit value for
android:exported be defined when intent filters are present]

After adding android:exported="false" to the activity, the following error is thrown during runtime:

Unhandled Exception: PlatformException(error, fun.gatch.story_sharing_example: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

Workaround

A workaround I was able to use was downgarding the targetSdkVersion to 30 in app/build.gradle:

...
        minSdkVersion 21
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }
...
@creativecreatorormaybenot creativecreatorormaybenot changed the title Missing android:exported targeting Android 31+ Build / sharing does not work targeting Android 31+ Mar 14, 2022
@NayanTala-Tagline
Copy link

NayanTala-Tagline commented Feb 14, 2023

Any update on this??
I have implemented snapkit in my app but i can't able to push build in internal testing, because tragetSdkVersion is 30 and if i update it to 31 then snapkit is not working.
Here i have attached screenshot :
image

@TimmyRB TimmyRB linked a pull request Feb 8, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants