Hello
In today's blog post we will discuss about a common error that occurs while building an Android based project in Phone Gap.
Phone gap issue: Android Build fails - "ANDROID_HOME is not set"
To get rid of this error you need to install the tools needed to build android applications and configure the environment variables ANDROID_HOME, ANDROID_HOME/tools, and ANDROID_HOME/platform-tools in the correct manner.
From the Android web site, download the correct version of the Android SDK for your operating system.
Unzip the archive to a location of your choosing. For example, on Linux or Mac, you can place it in the root
of your user directory.
Configure the ANDROID_HOME environment variable based on the location of the Android SDK. Additionally, add ANDROID_HOME/tools, andANDROID_HOME/platform-tools to your PATH.
for Mac OS X :
add the PATH to your .bash_profile
export ANDROID_HOME=/installation location/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
for Linux
add the PATH to your .bash and .profile
export ANDROID_HOME=/installation location/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
for Windows
add the PATH to My Computer>properties>Advanced system settings> Environment variables
set ANDROID_HOME=C:\installation location\android-sdk-windows
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
0 Comment(s)