2

I already set these variables:

echo $ANDROID_HOME => /usr/local/android-sdk-linux

echo $PATH => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/android-sdk-linux/tools:/usr/local/android-sdk-linux/platform-tools

But this same error remains when I execute "cordova build android" or "cordova run android --device":

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

Do you have any ideas why?

Thanks

2 Answers 2

0

I got the same error and what helped me solve the problem is removing the android platform from your cordova project and re-adding it.

cordova platform rm android cordova platform add android 
Sign up to request clarification or add additional context in comments.

Comments

0

Try downloading the Android Studio, and installing the platform. It should end up in the top level of your user's directory. export ANDROID_HOME=~/Android/Sdk, so you can try that.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.