cordova-android
cordova-android copied to clipboard
edit-config target="/manifest/application" conflict with config-file parent="/manifest/application"
Hi,
I try to include multiple cordova plugins
when try to add this edit-config, it claims tobe conflicted.
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:requestLegacyExternalStorage="true" />
</edit-config>
after troubleshoot notice that this conflicted with this one
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity android:name="com.cordovaplugincamerapreview.CameraActivity" android:screenOrientation="portrait" android:theme="@style/CameraPreviewTheme" />
</config-file>
if i remove this config-file parent="/manifest/application" it working fine, i can build it, but shouldn't this not a conflict?
how i fix this if i want to add both activity tag under application tag and add android:requestLegacyExternalStorage to application tag?
Regards,
I also stumbled over this issue and thanks to https://stackoverflow.com/a/54997687/1394330, changing file in edit-config from "AndroidManifest.xml" to "app/src/main/AndroidManifest.xml" fixed the issue for me.