How to run on the android? I got the errors


I’m tring to run on the android device. but I got the error after I did typing ‘the ionic cordova run android’.

Anyone who knows?

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova run android (exit code 1):

    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.

MacBook-Pro:andtest hsoh$ (node:3174) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: channel closed
(node:3174) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Have you installed the android SDK?

You are missing the ANROID_HOME eniroment variable. Suggest you install Android Studio on your machine.

oh my god ;;

OK Thank you !!!

1 Like