views:

132

answers:

2

Hi,

I'm just getting started with Android app development on a Mac, and I keep getting a NullPointerException everytime I go into Strings.xml to edit it.

Here's the steps I followed -

  • Downloaded eclipse 3.5
  • Installed the Android SDK
  • Downloaded SDKs from Android SDK manager.
  • Created a basic Hello World Project.

The project compiles and runs fine, but if I add even a single character to Strings.xml, a popup comes up that says -

"An error has occured. Please see the log for details.
An error has occured. Please see the log for details."

When I click details, all I see is - "An error has occurred. See error log for more details. java.lang.NullPointerException"

Anything I'm missing completely?

A: 

Oops, found a blogpost that fixed it for me. Apparently, you can't open XMLs with Android resource editor. I had to right click > Open With > XML Editor to make it work.

http://sridharcse.blogspot.com/2010/08/android-opening-stringxml-gives-error.html

Anyone with a better solution / if I messed something up during the SDK install, please post, I'll accept yours :)

Tejaswi Yerukalapudi
A: 

Are you definitely on 3.5? This is a known regression in the latest release of Eclipse, and (amongst other things) is a good reason to go back to 3.5 for the time being if you're doing any Android development. There's a bug for this in Eclipse's bug tracker:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=318108

If you need any more convincing of dropping back to 3.5 (if you are actually on 3.6, which I'm not saying that you necessarily are, it's just that this is highly unusual if you are) then there are some more issues to go around.

Sinjo
Thanks, I thought I d/led 3.5, but somehow endedup with 3.6 :(
Tejaswi Yerukalapudi
Yeah, I went through a couple of days of using it in what I thought to be a slightly broken state (having to use the normal XML editor). Then I hit the debugger and it all really fell apart. Back to my previous install now.
Sinjo