0

As I understand it, when using an AndEngine project from another project, one should add it as a library, but I cannot get this to work. For example, I want to use the Andengine-PhysicsEditor-Extension. I have an Andengine-PhysicsEditor-Extension project in Eclipse, then in the other project, I go to:

  • Project Properties, Java Build Path, Libaries, Add Library...
  • Android Classpath Container
  • Next>
  • Select Project Andengine-PhysicsEditor-Extension
  • Finish

So now the project compiles correctly, for example this line compiles:

final PhysicsEditorLoader loader = new PhysicsEditorLoader();

However, I get a run time error on that line:

java.lang.NoClassDefFoundError: org.andlabs.andengine.extension.physicsloader.PhysicsEditorLoader

What else do I need to get this to work?

One thing that I don't understand is that the directory in the AndEngine-PhysicsEditor-Extension project: \AndEngine-PhysicsEditor-Extension\bin\classes\org\andlabs\andengine\extension\physicsloader is empty. Perhaps it should have class files?

LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114
numberwang
  • 313
  • 1
  • 6
  • 22

1 Answers1

3

Check out this post I think you will find it usefull, it has already been discussed on SO, basically you should use Andengine as a library project ->right click properties->android->add library after you have it as a library in your workspace

Community
  • 1
  • 1
v0d1ch
  • 2,738
  • 1
  • 22
  • 27
  • It can be worth noticing that IntelliJ 12 Ultimate does not recognize the PhysicsEditor Extension, by default, as a library module when you import it. This causes the same error as the OP has. The solution us to tick it off as a library module. – Glenn Bech Feb 21 '14 at 12:16