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
[Bug][Android] '"{{proj_path}}\platforms\android\cordova\version"' is not recognized as an internal or external command, operable program or batch file. #170
Running cordova prepare android fails with the following error
cordova-custom-config: Skipping auto-restore of config file backup(s)
Error: Command failed: "{{proj_path}}\platforms\android\cordova\version"
'"{{proj_path}}\platforms\android\cordova\version"' is not recognized as an internal or external command,
operable program or batch file.
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:314:20)
at Pipe.<anonymous> (net.js:676:12) {
killed: false,
code: 1,
signal: null,
cmd: '"{{proj_path}}\\platforms\\android\\cordova\\version"'
}
[ERROR] An error occurred while running subprocess cordova.
Project was compiling fine before adding this plugin.
Then added plugin via: cordova plugin add cordova-custom-config
No changes to any files (other than package.json andpackage-lock.jsonfrom adding the plugin) Then runcordova prepare android`. And gets the error
The issue seems to be a conflict with cordova-plugin-add-swift-support
If I remove cordova-plugin-add-swift-support, this plugin works.
Bug report
Current behavior:
Running
cordova prepare android
fails with the following errorProject was compiling fine before adding this plugin. Then added plugin via:
cordova plugin add cordova-custom-config
No changes to any files (other thanpackage.json and
package-lock.jsonfrom adding the plugin) Then run
cordova prepare android`. And gets the errorThe issue seems to be a conflict with
cordova-plugin-add-swift-support
If I remove
cordova-plugin-add-swift-support
, this plugin works.Expected behavior:
The project should compile
Steps to reproduce:
Test project that shows this issue
https://github.com/ebhsgit/custom-config-test
Check out test project and run
cordova android prepare
Screenshots
Environment information
Cordova CLI version
10.0.0
Cordova platform version
Plugins & versions installed in project (including this plugin)
Dev machine OS and version, e.g.
20H2
Android build issue:
Node JS version
v12.19.0
Gradle version
Target Android SDK version
android:targetSdkVersion
inAndroidManifest.xml
Android SDK details
sdkmanager --list | sed -e '/Available Packages/q'
Related code:
https://github.com/ebhsgit/custom-config-test
Console output
console output
``` // Paste any relevant JS/native console output here ```**Other information:**