UnderwaterApps / overlap2d-runtime-libgdx

Overlap2D - UI and Level Editor libgdx runtime
http://overlap2d.com
Other
170 stars 96 forks source link

java.lang.ClassCastException when using proguard #86

Open bangive opened 8 years ago

bangive commented 8 years ago

I enable proguard and install app on device using the following command: gradlew android:installRelease android:run I have this error from adb log: E/AndroidRuntime( 8800): java.lang.ClassCastException: com.badlogic.gdx.utils.JsonValue cannot be cast to com.uwsoft.editor.renderer.data.SceneVO E/AndroidRuntime( 8800): at com.uwsoft.editor.renderer.resources.ResourceManager.initAllResources(SourceFile:96) E/AndroidRuntime( 8800): at com.uwsoft.editor.renderer.SceneLoader.<init>(SourceFile:63) E/AndroidRuntime( 8800): at com.example.mygame.r.create(SourceFile:15) E/AndroidRuntime( 8800): at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(SourceFile:280) E/AndroidRuntime( 8800): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1550) E/AndroidRuntime( 8800): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1278)

azakhary commented 8 years ago

You should make sure the VO classes are all excluded from progurad. mark them as "keep" in proguard.cfg. It's about everyjthing in com.uwsoft.editor.renderer.data.**