Problem generating .apk file


#1

Hello! I’m trying to generate .apk file using the following cordova cli command:
$ cordova build --release android

and I have this error:
Error: Failed to find ‘ANDROID_HOME’ environment variable. Try setting it manually.
Failed to find ‘android’ command in your ‘PATH’. Try update your ‘PATH’ to include path to valid SDK directory.

Nobody know where I need to change the path?

Thaks in advance.

Best regards.


#2

I’d advise you to read android getting started. You need to add the path to your android in the environment variables.

Dont forget to restart your command promt after adding the path.


#3

Thank you very much! Good guide :slight_smile:


#4

also read: http://www.tiagoporto.com/blog/environment-setting-tutorial-ionic-android-on-windows/