cordova-android icon indicating copy to clipboard operation
cordova-android copied to clipboard

edit-config target="/manifest/application" conflict with config-file parent="/manifest/application"

Open PicklesAU opened this issue 5 years ago • 1 comments

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,

PicklesAU avatar Nov 20 '20 04:11 PicklesAU

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.

th3hamm0r avatar Dec 10 '20 10:12 th3hamm0r