Thanks Xav, for looking into the bug and suggesting the jar file workaround. Most likely we will do that for now.
-Anar On Fri, May 20, 2011 at 14:05, Xavier Ducrohet <[email protected]> wrote: > The only possible workaround is to export the referenced project as a > jar file and use that in the android project. > > I've seen the bug you filed and will be looking at it to see what's up > in our builder (thanks for providing a test project too!) > > thanks > Xav > > On Thu, May 19, 2011 at 1:35 PM, Anar Huseynov <[email protected]> wrote: > > I have noticed a bug like behavior when an Android project is referencing > > other Java project with project layout where .java and .class files > reside > > in the same package (First option "Use project folder as root for > sources > > and class files" in project layout section when one creates a new Java > > project in Eclipse) as opposed to separate src and bin folders (second > and > > default option "Create separate folders for sources and class files" for > new > > java projects). In this case, the application would compile just fine in > > Eclipse but when it runs, it would throw NoClassDefFoundError exception > when > > any class in the referenced project is used. This behavior is not > observed > > when a referenced project is created using the second option. I have > > attached a zip file with 3 sample projects that exhibit this problem. If > > one changes the reference in AndroidLayoutTest project from > > FailingLayoutTest to WorkingLayoutTest, the exception would not be thrown > > when application starts. Both FailingLayoutTest and WorkingLayoutTest > > contain identical java files. > > > > In my case, my Android project is referencing a big Eclipse project > created > > using the first option so changing the project layout is not an option. > > However, I have to reference certain classes in order to develop my > Android > > application. Does anybody know how to workaround this problem? I know > that > > Android projects are using special Android builders. Is there any way to > > look how they work and possible fix them to work properly with the first > > layout option? > > > > Thanks, > > Anar > > -- > > Anar Huseynov > > Master of Software Engineering Program (MSE) > > School of Computer Science (SCS) > > Carnegie Mellon University > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > > http://groups.google.com/group/android-developers?hl=en > > > > -- > Xavier Ducrohet > Android SDK Tech Lead > Google Inc. > http://developer.android.com | http://tools.android.com > > Please do not send me questions directly. Thanks! > -- Anar Huseynov Master of Software Engineering Program (MSE) School of Computer Science (SCS) Carnegie Mellon University -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

