Answer the question
In order to leave comments, you need to log in
Problem starting a new project on cordova in WebShtorm?
I have created a new project in WebShtorme. Decided to run it. Gives an error on startup
/usr/local/bin/cordova run android
Running command: /home/vlzkonopatov/WebstormProjects/untitled/platforms/android/cordova/run
ERROR: Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.
ERROR running one or more of the platforms: Error: /home/vlzkonopatov/WebstormProjects/untitled/platforms/android/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
Answer the question
In order to leave comments, you need to log in
Add the path to the tools folder from the Android SDK to the PATH environment variable.
It seems everything is registered, the problem is also?
# User specific environment and startup programs
#PATH VARIABLES
#ANDROID SDK PATH SETUP
export ANDROID_HOME=/Users/wotyl/Documents/CordovaDev/sdk
export PATH=$PATH:${ANDROID_HOME}/platfrm-tools:$PATH:${ANDROID_HOME} /tools
#ANT PATH SETUP
export ANT_HOME=/usr/local/lib/node_modules/ant/ant
export PATH=$PATH:${ANT_HOME}/bin
#JAVA JDK PATH SETUP
export JAVA_HOME=/Library/java/JavaVirtualMachines/jdk1. 8.0_171.jdk/Contents/Ho$
export PATH=$PATH:${JAVA_HOME}/bin
#USER LOCAL BIN PATH SETUP
export PATH=/user/local/bin:$PATH
/Users/wotyl/app3/platforms/android/build/outputs/apk/android-debug.apk: 1 file pushed. 54.3 MB/s (1821105 bytes in 0.032s)
pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
ERROR running one or more of the platforms: Error: /Users/wotyl/app3/platforms/android /cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project
MacBook-Pro-Viktor:app3 wotyl$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question