Where to set home paths in ubuntu

I am running this command: ionic platform add android .I’m getting this error but dont know where to set it from. Thanks

Error: ANDROID_HOME is not set and “android” command not in your PATH. You must fulfill at least one of these conditions.

follow this stapes ;


Hi ottz0,

If you haven’t already, you may want to read this tutorial I had made for installing Ionic in Ubuntu:

To answer your specific question, you want to set the path in your ~/.profile file. It may not exist, but that is alright, just create it if it doesn’t.

Then in that file you might have a line that reads something like export PATH=$PATH:/path/to/android/sdk


Thanks I have set the variables in the .profile and can access android SDK Manager when I type android in the CLI, So I know this must have the correct path in order for this to run

However when I cd into my app and run ionic platform add android it gives Error: EACCESS open and when I try sudo platform add android it gives Error: ANDROID_HOME is not set and “android” command not in your PATH.

Any ideas?

Your sudo PATH is not going to match your user PATH. If you’re using sudo, you’re doing something wrong. Sounds like you have some permissions issues if you’re getting EACCESS errors.

Check the permissions on your project as well as your sdks such as android, cordova, npm, ext.