显示java.lang.NullPointerException在ADT的Mac捆绑打造的第一款Android应用程序时,第一款、应用程序、NullPointerException、lang

2023-09-05 04:24:58 作者:半爱情

当试图创建一个新的Andr​​oid应用程序,我可以通过整个向导直到最后得到的,当单击Finish给我一个错误:

When trying to create a new Android Application, I can get through the whole wizard until the very end, when clicking finish gives me an error:

在项目测试跑商的Andr​​oid资源管理器的错误。 显示java.lang.NullPointerException

Errors running builder 'Android Resource Manager' on project 'test'. java.lang.NullPointerException

我试图重新安装ADT多次无果。有谁知道我的问题就在这里?我有软件开发工具包的,我想要使用的API。

I have tried reinstalling ADT multiple times to no avail. Does anyone know what my issue is here? I have the SDKs for the APIs that I'm trying to use.

编辑:不知道,如果它的任何帮助,但是当看在安装新软件的ADT更新站点,我的错误psented $ P $

not sure if its of any help, but when looking at the ADT update site in 'install new software', I am presented by the error

而从库中读取错误: http://dl-ssl.google。 COM /安卓/月食/ site.xml中。

谢谢, 约翰·

推荐答案

我有过这样的错误,并最终解决了我的情况。

I have had this error, and have finally solved it for my situation.

我目前正在运行的小牛队,并已安装了Java 1.7.0_55和Eclipse的Java EE开普勒SR2 64位。我成功地安装了ADT插件Eclipse的,一切似乎工作,但我得到了相同的

I am currently running Mavericks and had installed Java 1.7.0_55 and Eclipse Java EE Kepler SR2 64bit. I successfully installed the ADT plugin on Eclipse, and everything seemed to work but I was getting the same

在项目测试跑商的Andr​​oid资源管理器的错误。显示java.lang.NullPointerException

Errors running builder 'Android Resource Manager' on project 'test'. java.lang.NullPointerException

错误,当我试图创建一个新的Andr​​oid应用程序的项目。

error when I tried to create a new android app project.

我终于决定安装Java 1.6( http://support.apple.com/kb/DL1572 )和ADT包。从ADT捆绑运行Eclipse工作得很好,但仍有由于使用Java 1.7,而不是1.6到Eclipse同样的错误。为了让Eclipse中使用不同的版本,我加了

I finally decided to install Java 1.6 (http://support.apple.com/kb/DL1572) and the ADT Bundle. Running Eclipse from the ADT Bundle worked fine, but still had the same error due to Eclipse using Java 1.7 instead of 1.6. To get Eclipse to use a different version, I added

<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java</string>   

<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java</string>

&LT; ADT-束目录&GT; /eclipse/Eclipse.app/Contents/Info.plist 。这解决了这个错误,我现在可以创建一个新的Andr​​oid项目并运行另一个版本的Eclipse与Java 1.7。 (看在Info.plist文件的意见,找出其中添加选项字符串。)

to <adt-bundle-directory>/eclipse/Eclipse.app/Contents/Info.plist. This solved the error, and I can now create a new Android project and run another version of Eclipse with Java 1.7. (Look at the comments in the Info.plist file to figure out where to add the option string.)

由于某些原因,制定自己的Eclipse版本(Java EE的开普勒SR2,而不是一个在ADT包)使用Java 1.6不起作用(Eclipse中不再具有空指针错误,但在创建时挂起项目)。

For some reason, setting my own version of Eclipse (Java EE Kepler SR2 and not the one in the ADT bundle) to use Java 1.6 does not work (Eclipse no longer has the Null pointer error, but it hangs when creating a project).

我想我应该只是跟着从一开始,这将有来自这个悲伤救了我对于Android的系统要求(Java的1.6)。我从Windows,它具有使用Java 1.7的Andr​​oid开发,我错误地假设(希望)将适用于MacOS上没有问题转换过来。

I guess I should have just followed the System Requirements for Android (Java 1.6) from the beginning, which would have saved me from all this grief. I am converting over from Windows, which has no problem using Java 1.7 for Android development, which I incorrectly assumed(hoped) would be true for MacOS.