Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
2.0.0
-
None
-
None
Description
Environment
Cordova: 6.5.0
CordovaCommon: 2.0.0
CordovaAndroid: 6.1.2
Description
Using the edit-config in a plugin.xml to add an additional attribute on the manifest or application tag in AndroidManifest.xml does not work.
Steps to reproduce
- Create new cordova project with android platform
- (Copy initial AndroidManifest.xml for comparison)
- Add cordova plugin which uses the edit-config setting to add a new attribute to manifest or application tag
- Compare updated AndroidManifist.xml and see attribute was not added
Expectation
Edit-config setting in plugin.xml allows to add/alter as well attributes on manifest/application/... level in AndroidManifest.xml
Example
This will work
<edit-config file="AndroidManifest.xml" target="/manifest/uses-sdk" mode="merge"> <uses-sdk android:minSdkVersion="16" android:maxSdkVersion="23" /> </edit-config>
This will NOT work
<edit-file file="AndroidManifest.xml" target="/manifest" mode="merge"> <manifest xmlns:tools="http://schemas.android.com/tools"></manifest> </edit-file> <edit-file file="AndroidManifest.xml" target="/manifest/application" mode="merge"> <application tools:replace="android:icon"></application> </edit-file>