0
votes

I created mobile application with Ionic. I want build application and I've a problem, I try build application on Vagrant but I get response error.

ERROR: 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

My .profile:

export ANDROID_HOME="/usr/local/android-sdk-linux/tools" export ANDROID_PLATFORM_TOOLS="/usr/local/android-sdk-linux/platform-tools" export PATH="$PATH:$ANDROID_HOME:$ANDROID_PLATFORM_TOOLS" ANDROID_HOME=/opt/android-sdk-linux ANDROID_PLATFORM_TOOLS=/opt/android-sdk-linux/platform-tools PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/u$ ANDROID_SDK=/opt/android-sdk-linux

How fix? Any ideas?

1

1 Answers

1
votes

I think you may try this

export ANDROID_HOME=/installation-location/android-sdk-linux

export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Look to the source for more details