Closed developer-dmp closed 2 years ago
You're right, I got a similar error message Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present
I will see about changing this.
I already put it in the PR, but just to make it a bit easier I'll repeat it here.
When these things happen, you can use tools:node="merge"
and avoid having to override the whole manifest entry.
Here, for example:
<!-- Fixes to Pusher to support Android 12 -->
<service
android:name="com.pusher.pushnotifications.fcm.EmptyMessagingService"
android:exported="false"
tools:node="merge" />
<activity
android:name="com.pusher.pushnotifications.reporting.OpenNotificationActivity"
android:exported="false"
tools:node="merge" />
Output from Android Studio when upgrading project to target Android 12:
Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined.
I noticed, even in latest release (1.7.0), that this error was being caused by this library. In order for my project to compile, I had to copy and paste elements from this Manifest into my own to override certain values. My Manifest file now contains this:
Notice how both elements have the
android:exported
field explicitly set. Once I updated my Manifest to look like this, the project compiles fine and runs as expected. I have both of the values set to true for the time being, but this should be something that is implemented in the library's Manifest.