我的Surface应用程序,使用SurfaceView,Thread和OnTouch与PointF随机删除它不会经常发生,但它在logcat中很烦人这是我得到的:
07-24 23:51:54.330 13133-13216/com.moving.igra.app W/dalvikvm﹕ threadid=11: thread
exiting with uncaught exception (group=0x41580ba8)
07-24 23:51:54.330 13133-13216/com.moving.igra.app E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-1385
Process: com.moving.igra.app, PID: 13133
java.lang.ClassCastException: java.lang.Object cannot be cast to android.graphics.PointF
at com.moving.igra.app.SurfaceViewThread.onDraw(SurfaceViewThread.java:105)
at com.moving.igra.app.SurfaceViewThread.run(SurfaceViewThread.java:154)
at java.lang.Thread.run(Thread.java:841)
Logcat说问题出在第105行:
PointF First_Touch= mActivePointers.valueAt(0);
PointF Second_Touch= mActivePointers.valueAt(1);
//This is the code in OnDraw
到目前为止,我没有找到任何有关此例外的解决方案,有关PointF的文献并不广泛。
感谢您的回答