Error with "cordova run android"

2

I'm getting an error while entering the command: "cordova run android"

NOTE: Remember that I've already set the path to sdk:

export PATH=$PATH:/home/giovanni/android/sdk/tools:/home/giovanni/android/sdk/platform-tools:/home/giovanni/android/sdk/build-tools:/home/giovanni/android/sdk/build-tools

ERROR:

giovanni@deathstar:~/Documentos/garconapp$ cordova run android

Error: Failed to find 'ANDROID_HOME' environment variable. Try setting it manually. Failed to find 'android' command in your 'PATH'. Try updating your 'PATH' to include path to valid SDK directory.

    
asked by anonymous 22.04.2016 / 14:47

2 answers

1

To fix this error, just install android studio. And it does not have to configure these system variables.

    
04.12.2017 / 21:30
0

Android Home should be the root folder ( root folder ) of the SDK.

If you are using Windows, try:

set ANDROID_HOME=C:\android-sdk-windows
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

Read more by clicking here

If the error persists, take a look at here .

EDITION: For Linux, in your case, then:

export ANDROID_HOME="$HOME/android-sdk-linux"
    
22.04.2016 / 15:09