gpt4 book ai didi

在 OS X 10.9.4 中创建第一个 Android 应用程序时出现 java.lang.NullPointerException

转载 作者:行者123 更新时间:2023-12-02 05:20:49 24 4
gpt4 key购买 nike

我刚刚下载了 Eclipse JUNO IDE for Android Developers v. 23.0.2.1259578我用作 jre:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

但是当我构建我的第一个 Android 应用程序时,我无法摆脱这个错误。

Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'HelloWorld'.
java.lang.NullPointerException

我正在遵循本教程,但我什至无法到达最后一步(当我单击“完成”按钮时出现问题):http://developer.android.com/training/basics/firstapp/creating-project.html

这里查看workspace/.metadata/.log:

!MESSAGE Errors running builder 'Android Resource Manager' on project 'HelloWorld'.
!STACK 0
java.lang.NullPointerException
at com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.abortOnBadSetup(BaseBuilder.java:327)
at com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder.build(ResourceManagerBuilder.java:92)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

最佳答案

解决了!

在编辑器中调出 $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini。在 -vmargs 行之前插入以下两行:

-vm/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java

关于在 OS X 10.9.4 中创建第一个 Android 应用程序时出现 java.lang.NullPointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26535927/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com