Android fatal exception: the main NULL pointer is abnormal. androidfatal

Source: Internet
Author: User

Android fatal exception: the main NULL pointer is abnormal. androidfatal

The code written by a teammate has been integrated over the past few days. I found a Button with an English name error. I changed the java file but forgot to change the id in the xml file.

Android fatal exception: the main NULL pointer EXCEPTION. When this EXCEPTION is thrown, the system prompts super. onMeasure (widthMeasureSpec, heightMeasureSpec) in the onMeasure method );

There is also a button click event in Fragment. There is a button in front of this Button, but the error is not reported.

Finally, we found that the button id of the original xml layout file does not match the id in the findViewById of the java file. I was surprised that there was no problem during the writing and the error was reported during compilation.

Related Article

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.