1,nullpointer--that is, the use of an object has not been initialized to cause the problem
Under what circumstances is it generally easy to appear?
(1) parent window + child window appears at the same time, the parent window for some reason, the child window is still in the operation of the child window can not find the PID of the parent window , there will be problems
(2) The problem occurs when a refresh or other click is performed during the loading process and a resource may not have been initialized successfully.
(3) Abnormal circumstances, such as the disconnection of the network, such as the need to connect the device is not connected, the corresponding resources can not be taken, at this point, click on some buttons, the problem will also occur
2, OOM-in the video \ image to switch back and forth, such as the screen of the back and forth to switch the process is relatively easy to appear, because its own machine comparison card, memory is small, loading a larger picture or video is easy to this problem
Solution:
(1) The loading process can be moved from the upper layer to the bottom, such as from the upper Java layer to the underlying C + + layer, which will be compared to save memory
(2) for different pixels of the mobile phone to do a different adaptation (compared to the chip pixel also changes, otherwise the high-pixel picture in the low-pixel cell phone also does not perceive)
Description and cause summary of common crashes or flashbacks on Android