开发者

I get a NullPointerException when trying the Eclipse "Hello World" tutorial

开发者 https://www.devze.com 2023-01-07 23:09 出处:网络
I was finishing up the \"Hello World\" tutorial in Eclipse (with the ADT plugin) and apparently, you are supposed to rename the string resource \"hello\" with \"Hello Android, I am a string resource\"

I was finishing up the "Hello World" tutorial in Eclipse (with the ADT plugin) and apparently, you are supposed to rename the string resource "hello" with "Hello Android, I am a string resource". Well, Java.Lang.NullPointerException pops up with four, "An error has occurred. See error log for details." There is nothing in the error log! For every letter I type to rename it, Java.Lang.NullpointerException pops up and I have no clue what is wrong. I don't have any other errors or problems wit开发者_开发知识库h my code. Does it have something to do with the "missing" gen file, because I had to change my Java to 1.6 to solve that... Maybe I need an update?


I got the same problem. I found a solution here: http://androidforums.com/developer-101/112731-problems-getting-eclipse-android-installed.html

Just replace your resources tag with the following:

<resources xmlns:android="http://schemas.android.com/apk/res/android">

Restart Eclipse.


Caution: There are known issues with the ADT plugin running with Eclipse 3.6. Please stay on 3.5 until further notice.

Probably you have installed latest Eclipse 3.6 Helios. You will need to switch to Eclipse 3.5.2 Galileo instead.


The error messages get posted to the LogCat tab. Look there instead of the Console. You also should try right clicking on the project, choose Android ToolsFix Project Properties.

0

精彩评论

暂无评论...
验证码 换一张
取 消