升级到ADT 22后,库不再添加到APK中 [英] Libraries do not get added to APK anymore after upgrade to ADT 22
问题描述
我有一个相当大的Android应用程序项目,它引用了几个图书馆项目。一切都很好,直到我将eclipse ADT插件升级到最新版本(v22)。当然我也升级了SDK。我在eclipse中看不到任何编译错误,但是当我在手机上运行项目时,我得到一个NoClassDefFoundError。
java。 lang.NoClassDefFoundError:org.acra.ACRA
....
arca库是包括在一个引用的库项目(在libs文件夹中),我可以在包资源管理器中的Android私有库中看到它,也正如我所说,没有编译错误。我们已经尝试了一大堆东西,包括但不限于:
$ b
$ b
- 重新安装android SDK
- 下载新的ADT软件包
- 删除所有我的代码都可以从git
- 将该库复制到应用程序项目
- 注释出使用该库的代码 - 我只要得到下一个图书馆的相同错误
所有没有任何成功,所以我真的很绝望这里。
如果有人可以给我一个关于如何解决这个问题的提示,我会很高兴。
从他的adt-dev文章引用波士顿的街道:
升级时,新的Android Private $ b的订单和导出 $ b库并不总是被检查。而android-support-v4.jar现在是
这个Android私人库部分。
要解决这个问题,请转到订单和导出,然后选中Android Private
库。然后刷新/清理/重建。
完成此项目修复后,您可能需要关闭
并重新打开任何依赖项目,因为它们可能看不到这个'修复'
马上。
给这个镜头,运气好会解决你的问题。
I have a rather big Android App project that is referencing several library projects. Everything was fine until i upgraded the eclipse ADT plugin to the newest version (v22). I also upgraded the SDK of course. I do not see any compile errors in eclipse, but when i run the project on the phone i get a NoClassDefFoundError.
java.lang.NoClassDefFoundError: org.acra.ACRA
....
The arca library is included in one of the referenced library project (in the libs folder) and i can see it in the "Android Private Libraries" in the package explorer, also as i said, no compile errors. The project runs fine on everyone else's computer that did not upgrade ADT.
I have already tried a whole bunch of stuff including but not limited to:
- re-install the android SDK
- download a fresh ADT bundle
- delete all my code an get it again from git
- copy the library in question to the app project
- comment out the code that uses this library - i just get the same error for the next library
all without any success, so i'm getting really desperate here.
I would be really happy if anyone could give me a hint on how to solve that problem.
Quoting Streets of Boston from his adt-dev post:
When upgrading, the 'Order and Export' of the new 'Android Private Libraries' is not always checked. And the android-support-v4.jar is now in this 'Android Private Libraries' section.
To fix this, go to 'Order and Export' and check 'Android Private Libraries'. Then refresh/clean/rebuild.
After you done this 'fix' for a library project, you may need to just close and re-open any depending project, because they may not see this 'fix' immediately.
Give this a shot and with luck it will solve your problem.
这篇关于升级到ADT 22后,库不再添加到APK中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!