Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova run android : ANDROID_HOME not set and android not in my path

When i run for android, i see this error :

ERROR: Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.

But this "variable" are ok. "Android" launch SDK manager and ANDROID_HOME redirect to my sdk folder.

I don't understand this error.

FYI my export :

export ANDROID_HOME=`brew --prefix android`
export PATH=${PATH}:$ANDROID_HOME/bin
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
like image 875
Sorcim Avatar asked Sep 25 '14 07:09

Sorcim


People also ask

What is ANDROID_HOME path?

ANDROID_HOME. Sets the path to the SDK installation directory.

How do I find my Android SDK path?

by default, the "Android Studio IDE" will be installed in " C:\Program Files\Android\Android Studio ", and the "Android SDK" in " c:\Users\username\AppData\Local\Android\Sdk ".


2 Answers

I answer me !

My solution :

sudo chown -R your-user /usr/local/lib/node_modules/cordova

Remove and add platform

like image 79
Sorcim Avatar answered Oct 17 '22 20:10

Sorcim


Ubuntu 14.04 gedit /root/.bashrc add line

export JAVA_HOME=/usr/lib/jvm/java-8-oracle/
ANDROID_HOME=/root/android/sdk/
export ANDROID_HOME=$ANDROID_HOME

PATH=$PATH:$ANDROID_HOME/tools
PATH=$PATH:$ANDROID_HOME/platform-tools
PATH=$PATH:$ANDROID_HOME/build-tools

IN TERMINAL source ~/.bashrc

Resolveu pra mim/Solved for me!

like image 3
gilcierweb Avatar answered Oct 17 '22 21:10

gilcierweb