Reputation: 159
I'm having trouble getting Cordova to run properly. Can you assist me on finding a solution to solving this problem?
Error 2
The command ""C:\Users\D\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" prepare --platform iOS --configuration Debug --projectDir . --projectName "BlankCordovaApp2"" exited with code 1.
C:\Users\D\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets
115
5
BlankCordovaApp2
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55
ANT_HOME=C:\apache-ant-1.9.3
ANDROID_HOME is not defined
Even after restarting my system, this problem still persist. I cannot run builds for any of the emulators available.
Upvotes: 4
Views: 4734
Reputation: 61
Try use Visual Studio settings. Choose Tools->Options->Cross platform->C++ There you can set paths for Android SDK and NDK, JDK and Apache Ant
Upvotes: 0
Reputation: 7031
Solution 1: We can ensure our Environment variables using Enironment Variable Settings from Visual Studio
. Try the solution to conform the Environment Variables as mentioned in the below link
Missing ant and "code 8" errors when building multi-device hybrid application project
Solution 2: Rename "ANDROID-HOME" to "ADT-HOME"
Upvotes: 0
Reputation: 1568
It seems you are setting your paths incorrectly. Please ensure your system variables are set as below:
Android
- Ensure that you have updated the SDK API level 19 through the SDK Manager
- Set the ADT_HOME environment variable to the SDK install location (default: C:\Users\<user>\AppData\Local\Android\android-sdk)
- Add to System Path: %ADT_HOME%\tools;%ADT_HOME%\platform-tools
Note: ADT_HOME not ANDROID_HOME
Java (x86 version only)
- Set the JAVA_HOME environment variable to C:/Program Files/Java/jdk1.7.0_55
- Add to System Path: %JAVA_HOME%\bin
Ant
- Set the ANT_HOME environment to point to the Ant folder path (C/ant-1.x.x)
- Add to System Path: %ANT_HOME%\bin
Reboot your machine once you make changes. Projects should build and run after that.
Note: If you were trying to debug using the iOS simulator, you will need to set up a Mac with our remote build agent.
*Taken from the official documentation (PDF)
Upvotes: 2