dpa99c / cordova-custom-config

Cordova/Phonegap plugin to update platform configuration files based on preferences and config-file data defined in config.xml
318 stars 84 forks source link

cordova-custom-config: Error updating config for platform 'android': Cannot use absolute path on element #160

Closed Tabishsohail closed 5 years ago

Tabishsohail commented 5 years ago

getting the below error always:

cordova-custom-config: Error updating config for platform 'android': Cannot use absolute path on element

Trying to add Permissions plugin in my project, but i never get a permission dialog neither at the app launch nor at at permissions.requestPermission(permissions.WRITE_EXTERNAL_STORAGE, function (succ1) { .

I added edit config in my config.xml but getting above error when try to build the project or try to remove and add the platform again:

`

    </config-file>
    <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest">
        <manifest xmlns:tools="http://schemas.android.com/tools" />
    </edit-config>`

Cordova version: 8.0.0 plugins installed: bms-core 2.5.0 "BMSCore" bms-push 3.4.0 "BMSPush" cordova-custom-config 5.1.0 "cordova-custom-config" cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport" cordova-plugin-advanced-http 2.0.4 "Advanced HTTP plugin" cordova-plugin-android-permissions 1.0.0 "Permissions" cordova-plugin-cocoapod-support 1.6.0 "Cordova CocoaPods Dependency Support" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-device 2.0.3-dev "Device" cordova-plugin-device-motion 2.0.1 "Device Motion" cordova-plugin-dialogs 2.0.1 "Notification" cordova-plugin-facebook 0.2.2 "CordovaFacebook" cordova-plugin-file 6.0.1 "File" cordova-plugin-file-opener2 2.2.0 "File Opener2" cordova-plugin-file-transfer 1.7.1 "File Transfer" cordova-plugin-geolocation 3.0.0 "Geolocation" cordova-plugin-globalization 1.11.0 "Globalization" cordova-plugin-hockeyapp 5.1.2 "HockeyApp" cordova-plugin-inappbrowser 1.7.2 "InAppBrowser" cordova-plugin-mfp 8.0.2019042416 "IBM MobileFirst Platform Foundation" cordova-plugin-mfp-jsonstore 8.0.2019041010 "IBM MobileFirst Platform Foundation JSONStore" cordova-plugin-network-information 2.0.2-dev "Network Information" cordova-plugin-okhttp 2.0.0 "OkHttp" cordova-plugin-screen-orientation 2.0.2 "Screen Orientation" cordova-plugin-shake 0.6.0 "Shake Gesture Detection" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-statusbar 1.0.1 "StatusBar" cordova-plugin-touch-id 3.3.1 "Touch ID" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-plugin-x-socialsharing 5.4.4 "SocialSharing" cordova-plugin-x-toast 2.7.2 "Toast" cordova-wifiinfo-plugin 0.1.0 "WifiInfo" cordova.plugins.diagnostic 4.0.10 "Diagnostic" es6-promise-plugin 4.2.2 "Promise" ionic-plugin-keyboard 2.2.1 "Keyboard" org.apache.cordova.signal-strength 1.0.0 "Signal" phonegap-plugin-barcodescanner 6.0.8 "BarcodeScanner" phonegap-plugin-mobile-accessibility 1.0.5-dev "Mobile Accessibility"

dpa99c commented 5 years ago

If you wish to use this plugin then you must use <custom-config-file> instead of <config-file> and <custom-preference> instead of <edit-config> since <config-file> and <edit-config> in config.xml are now parsed by Cordova so are ignored by this plugin.

cordova-custom-config: Error updating config for platform 'android': Cannot use absolute path on element

If this is arising due to <custom-config-file> or <custom-preference> elements present in the config.xml please run the CLI command with the --debug flag and post the full console output.

dpa99c commented 5 years ago

Closed due to no response from OP