Configure the android Development Environment on mac and macandroid Development Environment

Source: Internet
Author: User

Configure the android Development Environment on mac and macandroid Development Environment

From yesterday afternoon to now, it took almost a whole day to get familiar with mac and the configuration environment. It was almost OK and recorded the problems encountered throughout the process.


1. Install the java environment

I have heard that mac comes with a java environment, and java-version doesn't have anything, so I should install java first.

Oracle official website to download java can, link http://www.oracle.com/technetwork/java/javase/downloads/index.html? SsSourceSiteId = ocomen

I downloaded java7,

You can install the tool directly here without any problems.


2. Install adt-bundle-mac

Because google is now trying to promote his android studio, the official website seems to have removed eclipse with adt. You can only download studio or choose android sdk to configure eclipse by yourself, but it is too troublesome, the previous projects were all from eclipse, so we should first use the familiar environment to make the transition, so we are looking for eclipse in the world.

Find a suitable adt-bundle-mac-x86_64-20131030 for a long time.

There is a problem here. An error will be reported when a new project is created after eclipse is opened,

Errors running builder 'android Resource manager' on project '*'. java. lang. nullexception

Someone said it may be a problem with the java environment. Just uninstall the previous installation and reinstall it. After I unmount the terminal command, java 7 is still running, but you can just open eclipse again. Remember that jre6 was installed when the previous version of eclipse required the Java 6 environment. I don't know if it has any relationship with this, however, I will not go into further details.


3. ant

Download link http://ant.apache.org/bindownload.cgi

Refer to Region.

I feel like you can refer to the first one. These two articles are just different installation directories. The first one is put in/usr/local, the second problem may be put in the local directory in/usr/share. The configured environment does not work because I did not log out and log on again during configuration, I followed the second tutorial again.

After configuration, log out and log on again. It's so silly to be unfamiliar with linux.


4. ndk

Refer to Region

The download of ndk is A. binfile, which is a bit confusing. It is true that it is against md5. I am wondering if it takes a few days to decompress it. Pay attention to the decompression method.


This is basically done, because the previous project is compressed on windows, so it is a rar file, and the rar decompression mode is configured for a long time.

Reference http://jingyan.baidu.com/article/b24f6c82c50ad686bfe5da33.html


It's okay to import the previous project to eclipse, but some paths in the project such as ant packaging sdk packaging may need to be changed, the environment is okay.

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

Supplement:

After the above is done under the terminal still cannot use adb command, configure tools environment variables reference link http://www.eoeandroid.com/forum.php? Mod = viewthread & tid = 332267.



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

12-24 supplement

Because they are all configured according to online tutorials and are not familiar with linux, there is a question when configuring the environment,

Ant environment variables are written in etc/bashrc, while some environment variables for sdk configuration are written in ~ /. Bash_profile file,

Ant and sdk are based on the blogs of the two people respectively, so they may have different ideas. Today I have sorted out and understood it as follows:

The environment variables in etc/bashrc can be used by all users of this computer ~ /. Bash_profile can only be used by my own account.



Author: jason0539

Weibo: http://weibo.com/2553717707

Blog: http://blog.csdn.net/jason0539 (reprinted please explain the source)


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.