Build Android development environment for Mac and android for mac

Source: Internet
Author: User
Tags touch command

Build Android development environment for Mac and android for mac

There are two options for building an Android Development Environment on Mac:

1. Android studio

2. eclipse + ADT

    

Let's talk about my previous environment building experience.

First, try to use Android studio. After all, it is an official development tool and the IDE interface looks better. After studio is installed, it will download the Android sdk. This download seems to require FQ. You can set the IDE proxy server to download the sdk. The shadowsocksx proxy is set to socks 127.0.0.1 and the port is 1080. Download speed... it was still slow. Finally, I got the sdk ready and started to build the first project. At this time, the problem occurred and kept stuck at the stage of gradle loading necessary project jar packages, after waiting for a long time, the loading was not successful, so I gave up after a long time.

Next I wrote an ADT Bundle, which contains Eclipse, ADT plug-ins, and SDK Tools. It is an integrated IDE. You only need to install Jdk to start development. This is quite convenient, but it does not contain a simulator. You can download the SDK System images and then use the simulator. But after I got it, I found that I could open the simulator, but the simulator could not run the program, prompting that the application failed to start... I checked whether the version was incompatible. I haven't struggled with this problem any more. If the simulator doesn't work, just go to the real machine for debugging. debugging on the real machine is more intuitive and the startup speed is not slow.

My final development environment isADT Bundle + real machine debugging.

The ADT Bundle can beHttp://www.androiddevtools.cnDownload above, this website also has other Android development tools, tutorials, a very good site.

The configuration for debugging a real machine on Mac is as follows. Refer to Baidu:

Insert USB to the mobile phone, select mac about the local computer-> more information-> system report-> Find the usb option, a series of usb-related devices will appear on the right.

    

    

Enter the command in the mac terminal, echo 0x2717> ~ /. Android/adb_usb.ini indicates to input the device manufacturer ID to the initial configuration file of adb_usb.

  

Restart adb. The command is to disable adb kill-server first, and then open adb start-server. (If the adb command is not available, see the configuration below)

    

Use adb devices to view connected devices

    

Then we can create an Android project under the ADT Bundle and click run to run the project. The device indicates that the configuration is successful.

    

If the adb environment variable is not configured, configure it first:

Enter: cd ~ on the terminal ~

Touch. bash_profile (if the bash_profile file has not been created before, use the touch command to create a new one)

Open-e. bash_profile (meaning opening a file in a text editor)

Enter export PATH =$ {PATH} in the file: Your platform-tools PATH,

For example, export PATH =$ {PATH }:~ /Document/ADT_Bundle/sdk/platform-tools

Save the file and enter

Source. bash_profile

Adb

If the adb version is displayed, the configuration is successful.

 

Reference: Baidu Knows

 

      

Related Article

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.