@SirajKakeh wrote:
Hello,
I’m running Ionic 3 project and trying to runionic cordova run android --device
but it’s returning me an error saying:Error: Failed to find 'ANDROID_HOME' environment variable Try setting setting it manually. Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory
Even when running
ionic cordova run android
it produces the same error.
Other information:
echo $ANDROID_HOME
:/home/leno/Android/Sdk
I also have $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools in my path:
echo $PATH
:/home/leno/Android/Sdk:/home/leno/bin:/home/leno/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/db/bin:/home/leno/Android/Sdk/tools/bin/sdkmanager:/home/leno/Android/Sdk/platform-tools
Running ionic info:
cli packages: (/usr/lib/node_modules) @ionic/cli-utils : 1.19.0 ionic (Ionic CLI) : 3.19.0 global packages: cordova (Cordova CLI) : 7.1.0 local packages: @ionic/app-scripts : 3.1.4 Cordova Platforms : android 6.3.0 Ionic Framework : ionic-angular 3.9.2 System: Node : v8.9.3 npm : 5.6.0 OS : Linux 4.10 Environment Variables: ANDROID_HOME : not set Misc: backend : pro
Can someone point to me where the problem is please!
Posts: 2
Participants: 2