我相信下面的错误是我的许多文件中的某个变量是一个像int或somthing那样使用的浮点数:
java.lang.ClassCastException: java.lang.Float但是对于我的生活,我无法找到发生这种情况的地方,调试了所有的东西,也许下面的这个信息可以让更聪明的人知道,然后我就可以深入了解它。我正在使用Unity,并且在场景中的所有内容都被加载后发生崩溃。
如果您需要更多信息,请与我们联系。
从logcat:
W/dalvikvm( 3999): threadid=9: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 3999): FATAL EXCEPTION: GLThread 10
E/AndroidRuntime( 3999): java.lang.ClassCastException: java.lang.Float
E/AndroidRuntime( 3999): at android.app.ContextImpl$SharedPreferencesImpl.getInt(ContextImpl.java:2833)
E/AndroidRuntime( 3999): at com.unity3d.player.PlayerPrefs.GetInt(Unknown Source)
E/AndroidRuntime( 3999): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
E/AndroidRuntime( 3999): at com.unity3d.player.UnityPlayer.onDrawFrame(Unknown Source)
E/AndroidRuntime( 3999): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
E/AndroidRuntime( 3999): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)