I have just started dabbling in Cordova / Ionic to make Android / iOS apps with HTML5 / js, and so far I have gotten sample / tutorial apps to work sometimes, but not every time.
I am working on Windows and am trying to build my projects for Android for now.
After a couple tries, I am no longer able to build my apps, even completely "blank" template apps that I did not change at all. I tried creating apps via Cordova
cordova create hello com.example.hello HelloWorld
cd hello
cordova build android
or Ionic
ionic start test sidemenu
cd start
ionic build android
In both cases I get the same error:
Running command: C:Users
thissenDropboxMobileProjectshelloplatformsandro
idcordovauild.bat
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
at child_process.js:1137:20
at process._tickCallback (node.js:355:11)
ERROR building one of the platforms: Error: C:Users
thissenDropboxMobilePro
jectshelloplatformsandroidcordovauild.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
Yes, I do have the Android SDK and everything installed. The strange thing is: when I restart my computer and try it immediately, it works without problems and I'm even able to emulate / run the app. After a couple more tries, edits to the source code, etc (I am not quite sure what's causing it), it stops working and I cannot even build a newly created project anymore.
What's going on? Why does it work right after a reboot, but stops working for seemingly random reason?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…