0

I am new to Android programming (but not new to Java), and here it is whats holding my progress; I have simple app for providing device orientation. I cannot figure out, why am i getting following exception

12-16 11:29:59.122: W/dalvikvm(29078): threadid=1: thread exiting with uncaught exception (group=0x400205a0)
12-16 11:29:59.122: E/AndroidRuntime(29078): FATAL EXCEPTION: main
12-16 11:29:59.122: E/AndroidRuntime(29078): java.lang.NoClassDefFoundError: test.app.tools.orientation.OrientationProvider
12-16 11:29:59.122: E/AndroidRuntime(29078):    at test.app.LocationActivity.setReferences(LocationActivity.java:25)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at test.app.LocationActivity.onCreate(LocationActivity.java:20)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1794)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at android.app.ActivityThread.access$1500(ActivityThread.java:132)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at android.os.Looper.loop(Looper.java:150)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at android.app.ActivityThread.main(ActivityThread.java:4277)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at java.lang.reflect.Method.invokeNative(Native Method)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at java.lang.reflect.Method.invoke(Method.java:507)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-16 11:29:59.122: E/AndroidRuntime(29078):    at dalvik.system.NativeStart.main(Native Method)

This is project hierarhy:

enter image description here

Related LocationActivity line (line No.20)

orientationProvider = new OrientationProvider(...)

So why I cannot access my own non activity classes in the same application scope? What I have found to be super annoying is that in fact i CAN instantiate anonymous implementation of inner public static interface OrientationListener declared in OrientationProvider but still

Antoniossss
  • 31,590
  • 6
  • 57
  • 99

1 Answers1

0

One possible explanation might be that the class initialization failed for some related class. When that happens, the class in question is left in a limbo state such that attempting to load or initialize any other class that depends on it will throw an exception.

If this has happened, there should be another stacktrace earlier in the log ... unless you have somehow squashed the exception that reported that problem.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216