3

Two days ago, when my android project in eclipse still worked, I added "android SDK 4.0.3" to my SDKs (in addition to android SDK 2.1).

From that moment on, I have a trouble with slf4j-android library; here's the exception:

Uncaught handler: thread main exiting due to uncaught exception
  java.lang.ExceptionInInitializerError
  at java.lang.Class.newInstanceImpl(Native Method)
  at java.lang.Class.newInstance(Class.java:1479)
  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4363)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
  at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
  at it.cefriel.swa.urbanopoly.client.game.UrbanopolyActivity.<clinit>(UrbanopolyActivity.java:11)

The JAR I use is slf4j-android-1.5.8.jar. The build path seems correctly setted. I also tried to create another project using slf4j and I got the same error..

Any Ideas?

Thanks in advance

Simoconte
  • 31
  • 1
  • 5
  • Common problem now with the latest SDK Tools and ADT, this link http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17 probably has the answer for you. – NickT Apr 14 '12 at 10:30
  • http://stackoverflow.com/questions/10005206/twitter4j-androidruntime446-java-lang-noclassdeffounderror-twitter4j-http/10007966#10007966 – MKJParekh Apr 14 '12 at 10:56

1 Answers1

0

Try adding the slf4j-api-1.5.8.jar or latest version as well with the current slf4j-android-1.5.8.jar

tomasbarrios
  • 813
  • 9
  • 15