problem with example

Hi,

I wanted to test the photon cloud for android, downloaded the java android sdk and wanted to open the example project. Question is -how do I do it? I wanted to import the project into eclipse but it can't find the project.
So I just created new project, copied all the sources, resources and so on, added the two jars to the project, checked them in export , compiled and run. And it ended up with the runtime error
java.lang.NoClassDefFoundError: de.exitgames.demo.loadbalancing.DemoClient. Next I created simple project, added one class that implement IPhotonPeerListener and once again I ended up with NoClassDefFound error. Do I need to change something more in the project?

Any help would be nice.
Cheers
Mariusz

Comments

  • khetagkhetag ✭✭
    Hi,

    The following should solve the issue:

    - Open Java Build Path in project's Properties
    - Click on Order and Export
    - Check all the dependencies
    - Move gen "higher" that src, to make gen (automated code) be built before the src (source code)

    --
    Best regards, Khetag
  • Nope, didn't helped.
    Any other ideas?
  • Maybe someone could upload working example eclipse project that I could test out? That would be great. Because no matter what I do I can't make it work.
  • Actually, we don't support Eclipse anymore directly. The project and settings in the SDK are for the (newer) Android Studio:
    http://developer.android.com/sdk/installing/studio.html

    Maybe we can find some time to check Eclipse on Wednesday or Thursday but in general, we've never been to happy with that IDE and setting up projects.
    What's your current issue in the log?
  • Still the same - NoClassDefFoundError for DemoClient.

    I'm using libgdx and android studio is not well suited for gdx development. Especially that I do the multiplatform builds. Most likely my next game will be unity3d based so I don't feel the need to move to the android studio.

    Mariusz
  • "NoClassDefFoundError for DemoClient"
    I am stating the obvious here but this means you have to somehow get DemoClient in your project so it builds and is included in your apk.
    I don't know how this is done in Eclipse. Maybe you already have a reference but in worst case, you simply add it as source to your project. DemoClient should be in the SDK zip.
  • Yes it is in the source. That's the problem. I'm pretty sure I'm exporting all the required jars as well.
    I've basically tried to run the demo project included in zip. I can't import it into the eclipse but I just created the new project and added the existing sources. That's why I asked if anyone have an existing eclipse project that actually works. Because maybe there is an configuration issue.

    M
Sign In or Register to comment.