Handling of "Null Pointer" exceptions in ADT

Source: Internet
Author: User

The first Google summer College Students' blog sharing competition-2010 andriod

After eclipse, Adt, and Android sdks are installed, use the android resource editor to open strings. XML and color. in XML, a "null pointer" exception occurs. You can only manually encode the pointer at a time. You can't help but find a solution.

I have installed eclipse 3.6 and ADT 0.97 before, so I think these two are incompatible because eclipse is the latest version downloaded from the official website, therefore, the ADT may not be fully compatible with this version, so it is decided to downgrade the version. Therefore, you need to download an earlier version of eclipse 3.4 and decompress it online, if you have deleted the original eclipse file, note the following before extracting it to the same directory.

First, when you open eclipse, You need to specify the workspace. If you specify the original directory location, you need to delete the eclipse configuration folder under this directory ". metadata ", otherwise some very strange errors will occur, for example, I encountered a problem that cannot be displayedCodePrompt.

Step 2: Install ADT, but some unknown errors may also occur due to the previous installation. First, update ADT and ddms online and check whether the installation is successful. You can create a new project, check whether an android project exists. If not, delete the ADT and ddms and reinstall them.

Step 3: After completing the previous step, select "android" in preferences and specify the SDK location.

In this way, open the android resource editor and edit strings. xml again. No error occurs.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.