square / react-native-square-reader-sdk

React Native Plugin for Square Reader SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reader SDK is missing `android:exported` property on AndroidManifest.xml - Issues with Android 12/SDK 31

tylerc opened this issue · comments

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

  1. With an existing android project that uses the Square Reader SDK, set compileSdkVersion and targetSdkVersion to 31.
  2. Try to build and run the app.

Expected behavior

The app should build and install successfully.

Additional context

@tylerc Sorry for delay
android:exported is added in latest code.