库基于应用程序安装2 APK文件,没有之一 - 为什么?应用程序、文件、APK

2023-09-07 11:47:32 作者:女子无情便昰王°

我试图重组,使现有的应用程序,除了在派生活动几覆盖,能够方法,所有code将驻留在库中。这仍然doesn't出于某种原因的工作,但在试图解决此过程中,我发现了令我失望,有两个的apk安装文件,而不是一个(当我运行调试会话从日食):

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):

在第一个(和更大的文件)是 具有原始的库名称。 第二(仅在大小20KB)是 其派生的应用程序的名称。 The first (and larger file) is having the original library name. The second (only 20KB in size) is having the derived application name.

这是为什么,我在哪里可以了解更多关于此?

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

莫非是解释ClassNotFoundException问题我有?

推荐答案

我发现自己的答案。事实证明,我在两个项目的属性2关键设置,设置不正确:

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

在库项目,是图书馆 未被选中的某些原因。一世 可以发誓,我查了一下,但 知道如何异想天开了Android 在开发环境 Eclipse可以的话,我怀疑它 在未选中的Eclipse(或ADT 插件),因为一些小故障的结果。 在应用程序项目,我 忘了加我的库项目 作为通过添加一个参考... 按钮。 (我多么愚蠢的可能呢?) 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. 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.