Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Phone gap issue: Android Build fails - "ANDROID_HOME is not set"

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 3.11k
    Comment on it

    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"

    1. 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.

    2. From the Android web site, download the correct version of the Android SDK for your operating system.

    3. 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.

    4. 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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: