Android Environment under Mac Build notes (Android Studio)

Source: Internet
Author: User

This document has documented some of the processes that I have configured on my Mac for the Android development environment, to facilitate the direct selection of the official Ide–android Studio. This article includes the installation of Android studio, the creation of the first Hello World project, and the debugging of a real machine.

First download Android Studio

: http://developer.android.com/sdk/index.html

It is recommended to modify the hosts in advance, or download the SDK very slowly later

Su dovi/etc/hosts/

Add the following two lines:

203.208.46.146 Dl.google.com45 203.208.46.146 dl-ssl.google.com

Then: Wq exits.

After downloading is the DMG file, can install directly, but the installation process prompts the JDK requires more than 7 version (such as), because my Mac comes with jdk1.6, so only upgrade.

Below we go to download jdk1.7,:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

After the download and installation, we can automatically fill in the path of the JDK by clicking on the Detect button.

The JDK path after installation (note that it may be used later):

/library/java/javavirtualmachines/jdk1.7.0_71.jdk/contents/home

Then next, the following interface appears:

Tip To verify the SDK, then click Next

Next we choose Standard, click Finish,

The Android SDK is automatically installed without the SDK installed.

Click Finish to install, the following interface appears:

Used IntelliJ Idea Company products (Webstorm, phpstorm, etc.) will be very familiar with this interface

Below to create a new project, experience the option of start a, new Android Studio project, the following interface appears:

Fill in the application name, domain name (there is no easy to fill a can remember on the line), etc.

Next select the SDK,

Then select an empty blank Activity

Next is the activity name, layout name, and so on, leave the default, and then click Done to start creating.

OK, create successfully. The following interface appears:

(The default theme is very difficult to see the wood has ~, can be set in setting inside, can refer here: HTTP://ASK.ANDROID-STUDIO.ORG/?/ARTICLE/14)

At this point, you will find the error message (JDK version is too low), you need to configure the next JDK, click on the Open SDK Settings, fill in the address of the JDK7 just installed

/library/java/javavirtualmachines/jdk1.7.0_71.jdk/contents/home

Click OK and you will be prompted to reload the project later

Below to run the next try (I use the real machine debugging)

Connect your phone to your computer first, and remember to turn on debug mode

Then click on this little green icon: (or the run–> Run ' app ' in the menu bar)

Then the following interface appears, allowing you to select the device

Select your phone, then click OK, and the app will be installed on your phone.

Ok, here our environment is a preliminary construction completed.

(for installation steps under Windows, please refer to here.) HTTP://ASK.ANDROID-STUDIO.ORG/?/ARTICLE/9)

Domestic DOWNLOAD Link: http://tools.android-studio.org/
Official website Download Link: http://developer.android.com/sdk/index.html

Android Environment under Mac Build notes (Android Studio)

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.