Just a doubt. Is your second project (which is used by the first) a library project? In that case, it should work.
On Jan 9, 10:08 pm, Lazarus 101 <lazarus...@gmail.com> wrote: > I have two projects, the first one has the aidl files and other > classes that will be shared with the client aps, and the second one > has the implementation for aidl. First project is set as a dependency > for the second one, everything compiles just fine and run. But when I > try to access the service from a client a get a Runtime error > NoClassDefFoundError. > > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): > java.lang.NoClassDefFoundError: my.app.MyService$1 > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > my.app.myService.<init>(MyService.java:37) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > java.lang.Class.newInstanceImpl(Native Method) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > java.lang.Class.newInstance(Class.java:1429) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > android.app.ActivityThread.handleCreateService(ActivityThread.java: > 2940) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > android.app.ActivityThread.access$3300(ActivityThread.java:125) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > android.os.Handler.dispatchMessage(Handler.java:99) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > android.os.Looper.loop(Looper.java:123) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > android.app.ActivityThread.main(ActivityThread.java:4627) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > java.lang.reflect.Method.invokeNative(Native Method) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > java.lang.reflect.Method.invoke(Method.java:521) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > com.android.internal.os.ZygoteInit > $MethodAndArgsCaller.run(ZygoteInit.java:868) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) > 01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at > dalvik.system.NativeStart.main(Native Method) > > The problem is fixed if I copy the aidl file in the second project so > that the generated java interface is in the gen folder from the > second project. But this is not a viable option because I have to use > a build server (I don't have direct access to it) and all aidl files > have to be in the first project. > > Anyone else had a similiar problem? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en