Skip to content
Advertisement

[Error: Failed to find ‘ANDROID_HOME’ environment variable. Try setting setting it manually

Im using Cordova in Linux mint 17

I installed android sdk , cordova , android studio , nodejs 4

problem is here when i wanna build app in codova and run this on terminal :

sudo cordova build android

it shows

JavaScript

I put this code

JavaScript

on my

JavaScript

but it wont works

Advertisement

Answer

I don’t think its necessary to add everything into path.Just add the JAVA_HOME , ANDROID_HOME and ANT_HOME to path and point out the corresponding bin directory as:

For android studio

add this into your ~/.bashrc file:

JavaScript

you can do the same for Ant.

For java jdk

add this into your /etc/profile file:

JavaScript

Now in your terminal, type echo $PATH and make sure all the environment variables are added to the PATH!

Advertisement