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