0

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

1 Answer 1

1

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 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.