Reputation: 16
I've an error in ionic when I try to build android!
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.
but:
➜ echo $ANDROID_HOME
/home/amaitre/android-sdk-linux
and the command android work: http://hpics.li/b1c351a
Upvotes: 0
Views: 2956
Reputation: 1921
Download Android SDK Tools from http://developer.android.com/sdk/installing/index.html?pkg=tools
Extract in: /home/{{user}}/build/
Insert below code at ~/.profile (caution: do not remove anything from there, just append this code)
//set PATH so it includes android SDK toold
if [ -d "$HOME/build" ] ; then
ANDROID_HOME=$HOME/build/android-sdk
PATH="ANDROID_HOME/tools:$PATH"
fi
Please let me know if this suggestion solved your problem.
Upvotes: 1
Reputation: 78
Be careful if you sudo your ionic command ! Don't forget to add the path in your super user environment :)
Upvotes: 2