Mac (for Win). New Android Project. Java.lang.NullPointerException

Source: Internet
Author: User

Reference:

Answer to the 1.code.google.com-18 floor (MAC)/Windows user Reference 29 floor

2.How to Set $JAVA _home environment Variable on MAC OS X

3.http://hsj69106.blog.51cto.com/1017401/595598

Environment:

Mac OS X Yosemite

Jdk1.7.0_71

Eclipse Luna (4.4.1)

Error message:

Errors occurred during the build

Errors running builder ' Android Resource Manager ' on Project ' Hello World '

Java.lang.NullPointerException

Cause of Error:

1.Eclipse ADT Bundle does not support JDK7

Workaround:

(When you have Java 6/7 installed at the same time) let eclipse use jdk1.6 while running ADT, but still keep jdk1.7 as the default JDK.

1. Download and install jdk1.6

2. Get the jdk1.6 path

2.1 Think it's necessary. Refer to link 2 or StackOverflow to set the Java environment variable (not verified as necessary)

3. Go to Eclipse folder (right click on Mac Eclipse.app-Show package Contents/Show Packages Contents)

4. Find Eclipse.ini, open with editor (mac:texteditor/windows:notepad/etc.)

5. On the previous line of-vmargs, enter the following two lines of command:

-VM//  change here to your jdk1.6 path /system/library/java/javavirtualmachines/1.6.0.jdk/contents/ Home

6. After the setup is complete, eclipse may appear garbled in Chinese: Preferences-general-workspace-text file Encoding-you can see that the original default (UTF-8) becomes default (macroma N)-Select Other:utf-8

Mac (for Win). New Android Project. Java.lang.NullPointerException

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.