0

I have an android project and am trying to add JBox2D and added "jox2d-library-2.1.2.2.jar" as both a referenced library in Java Build Path|Libraries and via Android Dependencies and in both cases get the runtime error:

UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lorg/jbox2d/callbacks/ContactFilter;

I just don't understand why this is failing as there is only one instance of the JBox2D library jar added.

Has anyone else experienced this problem?

Each time before executing a run I perform a project clean.

Also, I have seen other Android developers have similar problems with different projects:

https://stackoverflow.com/questions/2680 ... ternal-jar

and I have tried their suggestions but with no luck.

Graham

Community
  • 1
  • 1
Graham Seed
  • 742
  • 3
  • 10
  • 24

1 Answers1

-1

if your ADT version 2.0 or higher lib file doesn t work.

Solution: -Delete lib file -Remove external jar file references from java build path -Create libs file -Copy jar file here(don't reference from java build path) -Clean your project

Now it's ready for run

yahya.can
  • 1,790
  • 1
  • 11
  • 9