"Android_home is not set and" ANDROID "command isn't in your PATH." The wrong solution

Source: Internet
Author: User

Refer to the following article to build Ionic + Cordova development Environment--

Ionic+cordova Study Environment Construction

The front is still relatively smooth, but when you start to test engineering Helloword, run sudo ionic platform add Android

Error:android_home is not set and "ANDROID" command isn't in your PATH. You must fulfill at least one of these conditions.    At/users/someone/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/lib/check_reqs.js:158:19 at    _ Fulfilled (/users/someone/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/node_modules/q/q.js:798:54)

After adding the path and android_home environment variables in the/etc/profile, the problem remains.

Google, found that some people encounter this strange situation, no one has the means to solve.

Finally, inspired by one of the replies (which mentions to ensure write access to the SDK directory), the ADT SDK directory is placed in the current user's ~ directory, and permissions are modified:

chmod 777 sdk/

Problem solving.

"Android_home is not set and" ANDROID "command isn't in your PATH." The wrong solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.