Error sudo ionic run android


#1

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
echo $ANDROID_HOME

Result:
/home/ml/android-sdk-linux

Please, help me?


#2

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??


#3

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…


#4

I have the same error, I am using Linux Mint (basically Ubuntu).
$ echo $ANDROID_HOME
/home/myName/bin/android-sdk-linux

The binaries from $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools are included in the PATH:
$ echo $PATH
/home/myName/bin/android-sdk-linux/tools:/home/myName/bin/android-sdk-linux/platform-tools:/…

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