문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top