错误:属性" ***"使用两个库项目在Android的时候已经被定义 [英] error: Attribute "***" has already been defined when using two library projects in Android

查看:154
本文介绍了错误:属性" ***"使用两个库项目在Android的时候已经被定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 Android的支持-V7-appcompat 在我的Andr​​oid项目库。现在,我想包括 actionbarsherlock 作为另一个库项目。当我添加第二个库,它提供了这么多的错误,如下面

I'm using android-support-v7-appcompat as a library in my Android project. Now I want to include actionbarsherlock as another library project. When I add the second library, it gives so many errors like below

android-support-v7-appcompat\res\values\attrs.xml:476: error: Attribute "attributeName" has already been defined

通过改变一个属性值和它的相关code段是我已经尝试了一种解决方案。但是,当有喜欢上面的近80行,它会变得一片狼藉。有没有其他办法可以解决这个问题呢?

By changing one attribute value and it's related code snippet is a one solution that I've tried. But when there are nearly 80 lines like above, it will get a messy. Is there any other way I can solve this issue?

推荐答案

解决这个问题的正确方法是在所有相关项目和库项目更新Android的支持库。在我来说,我已经使用Android的支持库,也是库项目来实现我的应用程序之一。当我更新这两个库,问题解决了。更新Android的支持库的方法是;

The correct way to solve this problem is by updating Android Support Libraries in all relevant projects and library projects. In my case I've used Android support library and also one of the library project to implement my application. When I update both libraries, the problem solved. The way of updating Android support library is;

  • 右键单击该项目
  • 选择 Android的工具在弹出的窗口中
  • 选择 添加支持库

这篇关于错误:属性" ***"使用两个库项目在Android的时候已经被定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆