Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standard void main() causes Verify error on 1.5 and 1.6 devices #609

Closed
badlogic opened this issue Sep 14, 2013 · 1 comment
Closed

standard void main() causes Verify error on 1.5 and 1.6 devices #609

badlogic opened this issue Sep 14, 2013 · 1 comment

Comments

@badlogic
Copy link
Member

From dasac...@gmail.com on June 22, 2010 22:38:05

This is per the discussion we had earlier. I read that the verify error is suppose to list exactly the who/what/when/where/how right above it in logcat, but I saw nothing. This is the error

E/AndroidRuntime( 666): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 666): java.lang.VerifyError: com.dasa.wastedspace.WastedSpace
E/AndroidRuntime( 666): at com.dasa.wastedspace.Game.onCreate(Game.java:26)
E/AndroidRuntime( 666): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
E/AndroidRuntime( 666): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2303)
E/AndroidRuntime( 666): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2371)
E/AndroidRuntime( 666): at android.app.ActivityThread.access$1800(ActivityThread.java:118)
E/AndroidRuntime( 666): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1759)
E/AndroidRuntime( 666): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 666): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 666): at android.app.ActivityThread.main(ActivityThread.java:4077)
E/AndroidRuntime( 666): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 666): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 666): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime( 666): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
E/AndroidRuntime( 666): at dalvik.system.NativeStart.main(Native Method)

I basically just commented this section out of the desktop portion of the app

/*
public static void main(String[] argv) {
JoglApplication app = new JoglApplication("Wasted Space", 480, 320, false);
app.getGraphics().setRenderListener(new WastedSpace());
}
*/

and all is fine. I'll try and get some more useful information on this error as soon as I can to amend this issue (like a bare minimum test bed to reproduce the error)

Original issue: http://code.google.com/p/libgdx/issues/detail?id=21

@badlogic
Copy link
Member Author

From badlogicgames on June 22, 2010 13:47:29

This is not a defect. Unless you link gdx-backend-desktop.jar to your Android project Dalvik can't find the JoglApplication class. The solution is to have a launcher for the desktop (with a JoglApplication), a launcher for Android (with an AndroidApplication) and your main logic seperated from both launchers. The reason this happens on Android < 2.0 is that they seem to load all referenced class in a dex file which will throw the exception you see in case the class is not available in any referenced jar. On 2.0 this seems to have changed.

Status: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant