You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
#342
Building an app with voltbuilder targeting API 31, using android-cordova 11 I get this error:
FAILURE: Build failed with an exception.
What went wrong:
_Execution failed for task ':app:processDebugMainManifest'.
Manifest merger failed : android:exported needs to be explicitly specified for element <receiver#nl.xservices.plugins.ShareChooserPendingIntent>. 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details._
FYI, the Android Developer site says:
This element sets whether the activity can be launched by components of other applications:
If "true", the activity is accessible to any app, and is launchable by its exact class name.
If "false", the activity can be launched only by components of the same application, applications with the same user ID, or privileged system components. This is the default value when there are no intent filters.
I manage to fix this on my local, but voltbuild as other tools generate the bundles "some where up there" using the npm packages so if the fix isn't applied to this project all the builds targeting android 12 and higher using this plugin are going to fail. This error can be fixed by adding the property "android:exported" on the ln 66 on plugin.xml replacing:
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
by <config-file target="AndroidManifest.xml" android:exported="true" parent="/manifest/application/activity">
I can't promise that I would do a PR with this case so if someone can do it, thanks in advance.
The text was updated successfully, but these errors were encountered:
Building an app with voltbuilder targeting API 31, using android-cordova 11 I get this error:
FAILURE: Build failed with an exception.
_Execution failed for task ':app:processDebugMainManifest'.
FYI, the Android Developer site says:
This element sets whether the activity can be launched by components of other applications:
If "true", the activity is accessible to any app, and is launchable by its exact class name.
If "false", the activity can be launched only by components of the same application, applications with the same user ID, or privileged system components. This is the default value when there are no intent filters.
I manage to fix this on my local, but voltbuild as other tools generate the bundles "some where up there" using the npm packages so if the fix isn't applied to this project all the builds targeting android 12 and higher using this plugin are going to fail. This error can be fixed by adding the property "android:exported" on the ln 66 on plugin.xml replacing:
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
by
<config-file target="AndroidManifest.xml" android:exported="true" parent="/manifest/application/activity">
I can't promise that I would do a PR with this case so if someone can do it, thanks in advance.
The text was updated successfully, but these errors were encountered: