AppWarp crashes on Android, Libgdx

518 views Asked by At
08-02 16:44:49.713: E/AndroidRuntime(3172): FATAL EXCEPTION: GLThread 2436
08-02 16:44:49.713: E/AndroidRuntime(3172): Process: com.jmptest.mptestappwarp.android, PID: 3172
08-02 16:44:49.713: E/AndroidRuntime(3172): java.lang.NoClassDefFoundError: com.shephertz.app42.gaming.multiplayer.client.WarpClient
08-02 16:44:49.713: E/AndroidRuntime(3172):     at  appwarp.WarpController.initAppwarp(WarpController.java:78)

I get the above error every time I try to run AppWarp on Android using the libgdx framework. I followed this tutorial http://appwarp.shephertz.com/game-development-center/java-multiplayer-libgdx-tutorial/ and downloading the app's source and attempted to run it, but I got the same error above when running on android. I figured it might be an issue with kitkat, so I update the app warp lib(the android-and-java-sdk one), but I still got the same error. So then I tried to implement it in my own game. And it works great on desktop, but, as seen in the error above, it crashes once again on android. It appears to be a NoClassDefFoundError, the class being WarpClient. Here is where it crashes:

private void initAppwarp(){
    try {
        WarpClient.initialize(apiKey, secretKey); //this line causes crash
        warpClient = WarpClient.getInstance();
    } catch (Exception e) {
        e.printStackTrace();
    }
}

This is directly out of their code, so I'm not sure what could be causing the issue. Why does app ward crash when I try to run it on Android?

1

There are 1 answers

0
josephoneill On BEST ANSWER

I solved it. Decided not to delete this question just in case someone else comes across this issue. While the core project contained the libs for app warp, the android project did not. This was causing the app to crash. While the code said there was no error, when the app was compiled, it was compiled without the libs, causing the NoClassDefFoundError. I simply copied the libs over to the android project from the core project, added them to the build path, and launched the app.