基于库的应用程序安装 2 个 APK 文件,而不是一个 - 为什么?
我正在尝试重构现有的应用程序,以便除了派生活动中的一些可重写方法之外,所有代码都将驻留在库中。这仍然由于某种原因不起作用,但在这个过程中在尝试解决此问题时,令我沮丧的是,我发现安装了两个 .apk 文件,而不是一个(当我从 eclipse 运行调试会话时):
- 第一个(也是较大的文件)是 具有原始库名称。
- 第二个(大小只有 20KB)是 具有派生的应用程序名称。
为什么会这样?我在哪里可以了解更多相关信息?
这可以解释我遇到的 ClassNotFoundException 问题吗?
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):
- 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?
Could that explain the ClassNotFoundException problem I am having?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己找到了答案。事实证明,我在两个项目的属性中都有 2 个关键设置未正确设置:
由于某种原因没有被检查。我
我可以发誓我检查过了,但是
知道Android有多么异想天开
开发环境下
Eclipse也可以,我怀疑是这样
未被 Eclipse(或 ADT
插件)由于一些故障而导致。
忽略添加我的图书馆项目
通过添加作为参考...
按钮。 (我能有多蠢?)
希望这对其他新手有用。
I found the answer myself. It turns out that I had 2 critical settings in the Properties of both projects not set correctly:
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.
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.