Mac builds Android development environment

Source: Internet
Author: User
Tags save file touch command

There are two general options for setting up an Android development environment on your Mac:

1.Android Studio

2.eclipse+adt

    

Tell me about my previous experience in setting up the environment.

First try to use Android Studio, after all, is the official development tool, the IDE interface is also more beautiful. After the studio is installed, it will download the Android SDK, this download seems to be FQ, you can set up the IDE proxy server to download, SHADOWSOCKSX proxy settings are socks 127.0.0.1, port 1080. Download speed ... Still relatively slow, finally under the good SDK, began to build the first project, this time the problem appeared, has been stuck in the gradle load the necessary project jar package this stage, and so on for a long time also did not see the load success, so toss a half a day after or give up.

Then an ADT Bundle, which contains eclipse, ADT plug-ins, and SDK Tools, is an already integrated IDE, just install the JDK and start developing. This feeling is very convenient, but it is not with the simulator. You can download the SDK System images, and then you can use the emulator. But I found out that I can open the simulator, but the simulator will not run the program, prompting the application failed to start ... Check out the issue that should be incompatible with the version. I also no longer tangled this problem, the simulator does not work, we directly on the real machine debugging it, debugging on the real machine is more intuitive, and startup speed is not slow.

My final successful development environment is ADT bundle+ real-machine debugging .

ADT bundles can be downloaded on http://www.androiddevtools.cn , and this site has a variety of other Android development tools, as well as tutorials and a great website.

The real-Machine Debug configuration under Mac is as follows, the reference from Baidu knows:

Phone plugged into USB, select Mac for more information, System report, find USB option, and a series of USB-related devices on the right we found the device.

    

    

Enter the command below the Mac terminal, echo 0x2717 >> ~/.android/adb_usb.ini means to enter the factory ID of the device into the initial configuration file of Adb_usb.

  

Restart ADB. The command is to close the ADB kill-server first, and then open the ADB start-server. (If the ADB command cannot be used, the configuration is shown below)

    

Use ADB devices to view connected devices

    

After that we can create a new Android project under the ADT Bundle and click Run to see if the device description is configured successfully.

    

If the ADB environment variable is not configured, first match it:

In Terminal input: cd ~

Touch. Bash_profile (Create a new one with the touch command before creating a Bash_profile file)

Open-e. Bash_profile (meaning to open a file with a text editor)

Enter Export Path=${path} in the file: your Platform-tools path,

such as export Path=${path}:~/document/adt_bundle/sdk/platform-tools

Save file, enter in terminal

source. bash_profile

adb

Configuration is successful if the ADB version number is displayed

Reference: Baidu knows

      

Mac builds Android development environment

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.