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
Hello,
I'm working on Ionic Framework using Capacitor. When I try to perform the assembleRelease the build process gets stopped by a failure in the :capacitor-cordova-android-plugins:processReleaseManifest task:
Task :capacitor-cordova-android-plugins:processReleaseManifest FAILED
C:\Users\rsuarez\source\repos\Incentive\android\capacitor-cordova-android-plugins\src\main\AndroidManifest.xml:6:1-10:12 Error:
android:exported needs to be explicitly specified for element <receiver#com.google.android.gms.analytics.AnalyticsReceiver>. 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.
What went wrong:
Execution failed for task ':capacitor-cordova-android-plugins:processReleaseManifest'.
A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction
Manifest merger failed : android:exported needs to be explicitly specified for element <receiver#com.google.android.gms.analytics.AnalyticsReceiver>. 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.
I set the "android:export=false" statement in the receiver index inside the AndroidManifest and the build process finally succeeds. The real issue is when I try to update the web assets to the Android project using "npx cap copy" the AndroidManifest is reset. I found a way to avoid this issue by updating manually the plugin.xml file in your module and adding the "android:exported" to the receiver key. Anyway, this fixes my local environment but I'm using Ionic's AppFlow to Release the App to the Play Store and the build process is fully automatic, so the manual update of the plugin.xml is not an alternative. I would like to evaluate this solution if it's possible, and if it's right and makes sense, create a fix for this. Of course, I'm not an expert and maybe this can't be performed the way I think, If this is the case, please can you tell me a way to win this situation? Thanks
The text was updated successfully, but these errors were encountered:
If manipulate the plugin.xml doesn't work for you, you can manually update the AndroidManifest.xml file in android\capacitor-cordova-android-plugins\src\main and define android:exported=false in the receiver key, at least this works for me.
Here it's what its looks like for me:
I am also facing the same error while trying to create APK. I tried your solution but it did not work for me at all.
It looks like someone updated this 6 months ago, but there has not been a package update since the change was made. Can you please publish the project with a new version?
Hello,
I'm working on Ionic Framework using Capacitor. When I try to perform the assembleRelease the build process gets stopped by a failure in the :capacitor-cordova-android-plugins:processReleaseManifest task:
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
FAILURE: Build failed with an exception.
Execution failed for task ':capacitor-cordova-android-plugins:processReleaseManifest'.
I set the "android:export=false" statement in the receiver index inside the AndroidManifest and the build process finally succeeds. The real issue is when I try to update the web assets to the Android project using "npx cap copy" the AndroidManifest is reset. I found a way to avoid this issue by updating manually the plugin.xml file in your module and adding the "android:exported" to the receiver key. Anyway, this fixes my local environment but I'm using Ionic's AppFlow to Release the App to the Play Store and the build process is fully automatic, so the manual update of the plugin.xml is not an alternative. I would like to evaluate this solution if it's possible, and if it's right and makes sense, create a fix for this. Of course, I'm not an expert and maybe this can't be performed the way I think, If this is the case, please can you tell me a way to win this situation? Thanks
The text was updated successfully, but these errors were encountered: