1

I just installed the new Android SDK and the ADT 17. After the Installation I ran into the known issue with external jars.

I renamed the directory to libs, removed all entries from the build path. The ADT added it to the android project again and now the libs are found.

BUT: A class from my own package isn't found anymore. The project is compiled but at runtime, during the first time the class is needed the NoClassDefFoundError-Exception is thrown:

03-27 13:31:56.483: E/AndroidRuntime(1051): java.lang.NoClassDefFoundError: com.my.package.local.PersistantAuthenticationManager
03-27 13:31:56.483: E/AndroidRuntime(1051):     at com.my.package.Login.onCreate(Login.java:93)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at android.app.ActivityThread.access$2300(ActivityThread.java:135)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at android.os.Looper.loop(Looper.java:144)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at android.app.ActivityThread.main(ActivityThread.java:4937)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at java.lang.reflect.Method.invokeNative(Native Method)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at java.lang.reflect.Method.invoke(Method.java:521)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-27 13:31:56.483: E/AndroidRuntime(1051):     at dalvik.system.NativeStart.main(Native Method)

How can I fix that?

schlingel
  • 8,560
  • 7
  • 34
  • 62

1 Answers1

0

I solved the problem: The problem was a referenced project and not a referenced jar. The problem: The Library didn't appeard in the Export-Tab, so I didn't recognized it as problem.

But when I took a closer look at the logcat messages I recognized a little error message why my class from the local package wasn't found. It implemented an interface from the referenced project and this interface wasn't found.

The cloue: After removing the project from the build path and adding it again, it appeared in the Export-Tab. Adding it to the exporting projects fixed this issue.

schlingel
  • 8,560
  • 7
  • 34
  • 62