Thanks Xavier. MyLibrary is the name of my library project. I don't explicitly create or intend to create the APK. The console shows that something is expecting to find it.
Here's my guess: I had to add the MyLibrary project as a dependency to MyApp project because otherwise MyApp could not find various classes defined in MyLibrary project. I suppose eclipse is trying to compile the MyLibrary project because of this dependency. Could that be it? If I don't add the project dependency (not to be confused with the library dependency you describe in the docs), then MyApp does not compile. On May 22, 10:15 pm, Xavier Ducrohet <x...@android.com> wrote: > There is something very strange here. > > What is MyLibrary.apk? > > I think you may be a bit confused with what libraries are. > > Library projects are handled at compilation time. They are *NOT* meant > to be export as APK (I don't even know how you managed to create > MyLibrary.apk because the tools don't let you do it). > > When you compile an application project that depends on a library, the > code and resources of the library are included in the app project's > apk when you compile it. > > Xav > > > > > > On Sat, May 22, 2010 at 4:21 AM, Mark Carter <mjc1...@googlemail.com> wrote: > > When trying to launch an activity, the console gives: > > > Uploading MyApp.apk onto device 'emulator-5554' > > Installing MyApp.apk... > > Success! > > Could not find MyLibrary.apk! > > Starting activity com.mycompany.MyActivity on device > > ActivityManager: Starting: Intent { act=android.intent.action.MAIN > > cat=[android.intent.category.LAUNCHER] cmp=com.mycompany/ > > com.mycompany.MyActivity } > > Attempting to connect debugger to 'com.mycompany' on port 8612 > > > And then the activity fails to start (ClassNotFoundException). > > > This seems to be because of the line: > > > Could not find MyLibrary.apk! > > > Any ideas? > > > On May 22, 11:49 am, Mark Carter <m...@carter.name> wrote: > >> Great to see the new Android Library Project feature in ADT 0.9.7. > > >>http://developer.android.com/guide/developing/eclipse-adt.html#librar... > > >> However, some things aren't clear to me yet: > > >> 1. In the library project, what does versionCode, versionName, > >> packageName now mean? I assume nothing??? > >> 2. The docs state that activities, services etc need to be declared in > >> the library project and also the app project. So doesn't this just > >> result in a load of duplication? What if the activity is declared > >> slightly differently in one to the other? > >> 3. It would have been incredibly useful to allow library projects to > >> reference each other. I'm curious as to why this is not possible... > >> 4. If an app references both resources and code in a library project, > >> then that library project needs to be added as both a library and a > >> project in the app's build path (in eclipse at least) - why is this? > >> 5. I'm considering subclassing library project activities/services in > >> my app project. Is there any reason not to do this? > > >> -- > >> 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 > >> athttp://groups.google.com/group/android-developers?hl=en > > > -- > > 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 > > -- > Xavier Ducrohet > Android SDK Tech Lead > Google Inc. > > Please do not send me questions directly. Thanks! > > -- > 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 > athttp://groups.google.com/group/android-developers?hl=en -- 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