Null pointer exception error set

Source: Internet
Author: User

1.dataManager when get what thing null pointer, most likely is not initialized, even if the global variable is initialized in another place, here also need to call.

2. Error loading picture
This.mImageLoader.get (Imgurl,listener);
All three objects have a value, but a null pointer is reported.
To see if the object you want to use when Imageloader is created is empty.
#我出过这样的错, the problem is the address did not write ":", careless killed people!

3. Null pointer
Load the view when the null pointer, not just to see if find is not the corresponding control, but also to see the set of the page is not wrong.

4. Initialize the Async method before calling it! Asynchronous is to do their own, so you have to give him the initial value AH. Otherwise, the pointer will be empty. Especially remember Mdata (List) and Requestqueue.
Adapter Don't worry, he will call the Notifychanged method to tell the main thread when the change is complete.

Null pointer exception error set

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.