简体   繁体   English

Android库项目库依赖关系

[英]Android library projects libs dependencies

I'm currently working on a project where I use multiple libraries. 我目前正在使用多个库的项目中工作。 Multiple libraries use the android support library, so when I want to compile my app Eclipse complains about it with a Dalvik error. 多个库都使用android支持库,因此当我要编译我的应用程序时,Eclipse会抱怨Dalvik错误。 I already found out that I should only have the support library 1 time in my project. 我已经发现我的项目中应该只拥有1次支持库。 But, this breaks the library projects which causes that I cannot compile anymore. 但是,这破坏了库项目,导致我无法再进行编译。

How should I properly handle this? 我该如何正确处理?

If you use support library such as v4 and your project contains other library projects, you should keep the only one version of the v4 library. 如果使用v4之类的支持库,并且您的项目包含其他库项目,则应保留v4库的唯一版本。 Choose one of the library file (the one that has the biggest size for example), remove all the duplicates and then copy this v4 into each project library which uses it. 选择一个库文件(例如,最大的文件),删除所有重复项,然后将此v4复制到使用它的每个项目库中。

Check if any of your libraries include the support library already. 检查您的任何库是否已包含支持库。 Maybe it's failing because it's already included. 可能是失败了,因为它已经包含在内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM