Reader SDK is missing `android:exported` property on AndroidManifest.xml - Issues with Android 12/SDK 31
tylerc opened this issue · comments
Tyler Church commented
Describe the issue
Targeting Android 12 (SDK 31) results in the following build error:
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
List of apks:
[0] '<redacted>\android\app\build\outputs\apk\debug\app-debug.apk'
Installation failed due to: 'Failed to commit install session 1920095454 with command cmd package install-commit 1920095454. Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1920095454.tmp/base.apk (at Binary XML file line #407): com.squareup.queue.QueueService$BootReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'
Retry
Failed to launch an application on all devices
To Reproduce
- With an existing android project that uses the Square Reader SDK, set
compileSdkVersion
andtargetSdkVersion
to 31. - Try to build and run the app.
Expected behavior
The app should build and install successfully.
Additional context
- It seems I'm not the only one with this error: https://developer.squareup.com/forums/t/android-12-readersdk-parameter-exported-in-androidmanifest-xml/4636
- And other Square libraries have fixed the issue already: square/leakcanary#2076