Android Studio under Gradle Environment building

Source: Internet
Author: User

There are more authoritative Gradle installation tutorials on the Web page, which says JDK 1.5 or later. Gradle comes with the Groovy library. But it appears when the Gradle is executed .

-bash:gradle:command not found

Problem.


If you are using Android Studio for development, there is no need to download the Gradle Zip package installation, as Android Studio has its own gradle. We can help the computer find the Gradle command in a Mac environment in the following ways:

1. Right-click the Android Studio.app in the Finder and click "Show Package Contents";

2, click "Contents", "Gradle", "gradle-2.14.1" (depending on the version of your studio), "Bin"

3, right-click "Gradle", copy out the path, such as "* * * (your own path)/android Studio.app/contents/gradle/gradle-2.14.1/bin"

4. Open "Terminal (Terminal)"

5. Execute "CD ~"

6. Implementation of "touch. Bash_profile"

7. Implementation of "OPEN-E. Bash_profile"

8, at the end of the Bash_profile file added ( note the red Slash, it must be added!) )

Export gradle_home=*** (your own path)/android\ studio.app/contents/gradle/gradle-2.14.1

Export Path=${path}:${gradle_home}/bin

9. Save exit, execute "source. Bash_profile" Application Modification

10, the implementation of GRADLE-V



Appear:

------------------------------------------------------------

Gradle 2.14.1

------------------------------------------------------------


Build time:2016-07-18 06:38:37 UTC

revision:d9e2113d9fb05a5caabba61798bdb8dfdca83719


groovy:2.4.4

Ant:apache Ant (TM) version 1.9.6 compiled on June 29 2015

jvm:1.7.0_79 (Oracle Corporation 24.79-b02)

Os:mac OS X 10.11.5 x86_64


This article is from the "Echo and you take off" blog, please be sure to keep this source http://5052416.blog.51cto.com/5042416/1921185

Android Studio under Gradle Environment building

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.