开发者

Troubleshooting java.lang.NullPointerException in Android SDK tutorial exercise

开发者 https://www.devze.com 2023-01-11 08:53 出处:网络
Currently I am going through a Sams learn Android SDK in 24 hours book and cannot get past the first hour because of the problems.

Currently I am going through a Sams learn Android SDK in 24 hours book and cannot get past the first hour because of the problems.

As I mentioned before, I have read all suggestions I could find on the gen folder error and I have done the clean without the build all, I have removed gen and then did a build all, I have set the permissions on this folder to be NON read only and made sure that the version of SDK is ticked under the Java Build path option on the projects properties.

This is a clean install of eclipse and Androids SDK and I have followed the instructions carefully.

In addition to this, I find eclipse/Androids SDK unstable, for example, double clicking on the strings.xml causes eclipse to lock up and then I have to reboot or shutdown. As and when I do get to the Android Resources screen for the strings.xml I get this error:

java.lang.NullPointerException

Please can someone help as I really want to learn this language but at the moment, not getting any further than hello world!!!.


Ryan thanks for your reply . When I first installed eclipse it was on 3.5. With the adk isn't this installed via the eclipse install new software option via the window menu in eclipse ?

The book is fairly current as it talks about 2.1 of Android and I have followed googles and the instructions from the book and see no differences . When I first installed this all I followed googles instructions and I hit the.java build issue and it locking up. I then decided to install it again from scratch and.following the book downloaded eclipse IDE java ee developers

To Mike - not that I have notice, you don' think it is a virus do you?

Latest on this matter - I have installed 3.5 non EE version and although I do not get the开发者_运维问答 build errors anymore, I still find the eclipse interface to hang on occasions.


If you import a makefile projects directly, it will occur an error "NullPoint Exception", the proper way is:new a makefile project first,then copy your files into the newly created project. Build it.


I've found when the gen folder can not build, it's a problem parsing strings. So you might want to right click on strings.xml and open that up using the plain text editor. If you're getting errors on a completely new app, then it might be something else, but I would at least check out strings.xml.


I think the problem I have had with eclipse etc has been my A/V program Kaspersky, since changing this I do not seem to be having any problems .

Thanks for everyones input on this.

0

精彩评论

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

关注公众号