V
V
vlzkonopatov2015-05-21 14:43:18
webstorm
vlzkonopatov, 2015-05-21 14:43:18

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

How to fix it ?*

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RaySeven, 2016-03-03
@RaySeven

Add the path to the tools folder from the Android SDK to the PATH environment variable.

W
wotyl, 2018-05-21
@wotyl

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 question

Ask a Question

731 491 924 answers to any question