Error sudo ionic run android

sudo ionic run android

execvp(): Permission denied
Running command: /home/ml/projetos_pessoal/ion/sabesp/platforms/android/cordova/run
ERROR: Error: ANDROID_HOME is not set and “android” command not in your PATH. You must fulfill at least one of these conditions.

But when execute


Please, help me?

looks like you have to set your environment variables and the path ANDROID_HOME make sure you have the right path to the android SDK if you are in windows but looks like your are in a linux machine??

Linux ubuntu.

Already set android_home.

export ANDROID_HOME=/home/ml/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platforms-tools


But continue error…

I have the same error, I am using Linux Mint (basically Ubuntu).

The binaries from $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools are included in the PATH:
$ echo $PATH

Now when I type
$ ionic build android

I get in red:
execvp(): Permission denied

But then it proceeds and it says BUILD SUCCESSFUL at the end.

Now I try
$ ionic run android

It still says BUILD SUCCESSFUL and even LAUNCH SUCCESSFUL, but it doesn’t start the app on my phone (Samsung Galaxy S2). It only opens the standard menu (like when I tap the symbol on my phone), but not the app.

I hope someone can help! Thank you