Hello,
I am trying to build a cordova application with Huawei Push Notification together with OneSignal plugin, but unfortunately voltbuilder cannot build the test apk for Android. Some additional infos:
- I am trying to build for android 12, so I followed the documentation.
- IOS test builds and Android test builds are working great, also push notification (through onesignal plugin) are working.The same apk, uploaded on my huawei device, work well (except for push notification).
- The problem arises when I include in the config.xml the following:
<plugin name="@hmscore/cordova-plugin-hms-push" spec="6.3.0-304" />
In voltbuilder.log, this is the problem reported:
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : android:exported needs to be explicitly specified for element <receiver#com.huawei.hms.cordova.push.receiver.HmsLocalNotificationBootEventReceiver>. 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.
See log for full details.
2022-12-20 14:54:50,883 - Build failed f8fcd257-2fd2-493f-b920-bfb9206b44e7
2022-12-20 14:54:52,000 - Output:
This is strange, as I did everything explained in the documentation, particullary:
- Added
<engine name="android" spec="11.0.0" />
- Added
<preference name="AndroidXEnabled" value="true" />
- Checked all plugins are up to date
- In platform android, I added:
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity" >
<application android:exported="true"/>
</edit-config>
But it still won’t build. Any idea on how to resolve this? I can attach the voltbuilder.log if it can help.
Thank you very much to anyone who will help me!