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;