Reputation: 1
I was trying to debug Cordova mobile build in VS Code while building it throws the following the error
Error: cmd: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NullPointerException
at org.gradle.wrapper.PathAssembler.getDistName(PathAssembler.java:84)
at org.gradle.wrapper.PathAssembler.getDistribution(PathAssembler.java:40)
at org.gradle.wrapper.Install.createDist(Install.java:44)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
at ChildProcess.whenDone (D:\novaspectapp\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at ChildProcess.emit (events.js:189:13)
at maybeClose (internal/child_process.js:970:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
'cordova.cmd run android --device --verbose --no-update-notifier' failed with exit code 1
Upvotes: 0
Views: 519
Reputation: 5742
Remove node module and install again
https://code.luasoftware.com/tutorials/npm/npm-how-to-reinstall-node-modules-packages/
rm -rf node_modules
npm install
then
cordova platform rm android
cordova platform add android
Upvotes: 1