问题描述
我试图重组,使现有的应用程序,除了在派生活动几覆盖,能够方法,所有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) ishaving the original library name.
- The second (only 20KB in size) ishaving 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. Icould swear that I checked it, butknowing how whimsical the Androiddevelopment environment underEclipse can be, I suspect that itwas unchecked by Eclipse (or the ADTplugin) as a result of some glitch.
- In the application project, Ineglected to add my library projectas a reference via the Add...button. (how dumb could I be?)
希望这可能是有用的其他新手的到来。
Hoping this can be useful for other newbies to come.
这篇关于库基于应用程序安装2 APK文件,没有之一 - 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!