4

I am trying to restructure an existing app so that, except for a few override-able methods in a derived activity, all code will reside in a library. This still doesn't work for some reason, but in the process of attempting to troubleshoot this, I discovered much to my dismay that there are two .apk files installed, not one (when I run a debug session from eclipse):

  1. The first (and larger file) is having the original library name.
  2. The second (only 20KB in size) is having the derived application name.

Why is that and where can I learn more about this?

Could that explain the ClassNotFoundException problem I am having?

Community
  • 1
  • 1
an00b
  • 11,338
  • 13
  • 64
  • 101

1 Answers1

4

I found the answer myself. It turns out that I had 2 critical settings in the Properties of both projects not set correctly:

  1. In the library project, "Is Library" was not checked for some reason. I could swear that I checked it, but knowing how whimsical the Android development environment under Eclipse can be, I suspect that it was unchecked by Eclipse (or the ADT plugin) as a result of some glitch.
  2. In the application project, I neglected to add my library project as a reference via the Add... button. (how dumb could I be?)

Hoping this can be useful for other newbies to come.

an00b
  • 11,338
  • 13
  • 64
  • 101
  • I had the same problem and had done what you indicated already. For me it turns out the problem was that I had the library in the build path in addition to being added as a library already. Once I removed it from the build path, it was all good! – atraudes Jul 11 '11 at 19:50