nativescript-community / nativescript-vscode-extension

A Visual Studio Code Extension for NativeScript
https://www.nativescript.org/visual-studio-code
Apache License 2.0
82 stars 32 forks source link

ERROR: [31;1mCannot read property 'toString' of undefined #67

Closed spstratis closed 8 years ago

spstratis commented 8 years ago

After installing the newest version of the VS Extension I can no longer run the VS Code debug to debug on Android. I get the following error:

[31;1mCannot read property 'toString' of undefined Command failed: The debug process exited unexpectedly code:127

It also states that: The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android. To be able to perform Android build-related operations, set the ANDROID_HOME variable to point to the root of your Android SDK installation directory.

My ANDROID_HOME environment variable seems to be set correctly as I can run echo $ANDROID_HOME and see the correct path at /Users/<myUserName>/Library/Android/sdk

Please let me know if you have any ideas what the cause could be as this is really killing my ability to work on my app! Thank you, up until the extension has been fantastic!

spstratis commented 8 years ago

For what ever reason my ANDROID_HOME variable kept resetting itself. I ended up just adding it to my bash profile and updating the paths that way in order to fix this issue. This change was only required after I updated my Nativescript extension though.