This exception occurs when the multi-touch zoom-in or zoom-out operation is performed on the image you have drawn. This error does not occur if the image is zoomed-in or zoomed-out.
This bug is caused by the Android system, so the first method is:
ModifyAndroid_view_motionevent_nativegetaxisvalueMethod
Comment out
If (! Validatepointerindex (ENV, pointerindex, pointercount) {return 0 ;}After the change, you need to re-compile the entire system, and then replace the Lib library. It usually takes more than half an hour to re-compile the entire system. This method is troublesome. The second method is: capture illegalargumentexception (invalid parameter exception) exceptions, as shown in
Private float spacing (motionevent event) {try {x = event. getx (0)-event. getx (1); y = event. gety (0)-event. gety (1);} catch (illegalargumentexception e) {// todo auto-generated catch blocke. printstacktrace ();}The second method is simple and effective.