android新建程序时出现Errors occurred during the build

来源:互联网 发布:qq直播是什么软件 编辑:程序博客网 时间:2024/05/17 22:24
新建Android程序时遇见报错如下:后来查阅一些资料都不能解决,google果然很给力,其实最基本的原因就是自己安装了jdk1.7,但是苹果系统ADT不兼容造成的吧
你是不是报这个错。
Errors occurred during the build.Errors running builder 'Android Resource Manager' on project 'test'.java.lang.NullPointerException
如下截图:
上面错误结果就是这样,现在给你解决方法:终端进入自己的eclipse下
$ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini ,然后在vmargs行之前,加入如下两行配置
-vm/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
ok解决了。贴出国外大牛的原话,自己英语一般就不要一句句翻译了。自己看吧
I confirm that the ADT bundle does not work with the Oracle Java 7 SE JDK, failing with an NPE in the Android Application Project wizard.Here's a workaround that lets you keep Java 7 as the default but run ADT with Java 6 when you have both installed. Bring up $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini in an editor.  Before the -vmargs line, insert these two lines:-vm/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
                                             
1 4
原创粉丝点击