Solve the Problem of java. lang. NullPointerException in Eclipse in cocos2d-x3.2, java. lang. exception

Source: Internet
Author: User

Solve the Problem of java. lang. NullPointerException in Eclipse in cocos2d-x3.2, java. lang. exception


Error 1 Analysis: java. lang. NullPointerException is a null pointer. NULL pointer reference is caused by no value assignment or incorrect value assignment.

Check if any initialization causes a null pointer.

Summary:Java. lang. NullPointerException reference Null Pointer Error solution is to carefully check the code to see if any instance is not initialized

.

In the android development and debugging environment of Eclipse, it is not possible to identify which variable is not initialized and in the source code line, which makes debugging difficult for new users.

Generally, you can add a breakpoint to run the query. However, the breakpoint debugging is invalid because the error statement is in the last sentence of a function. And

Seriously suspected that no error was reported at the breakpoint!


Error 2 AnalysisSummary:; The jre of the jar package project is 1.7, which can be changed to 1.6;
Therefore, the jre environment of the main jar package must be consistent with the jre environment of Android;




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.