我用 Android的支持-V7-appcompat 在我的Android项目库。现在,我想包括 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的工具的在弹出的窗口中 选择 添加支持库的上一篇:里面滚动型谷歌地图API V2 SupportMapFragment - 用户无法滚动地图垂直地图、里面、用户、型谷歌
下一篇:没有风格ViewPagerIndicator与SherlockActionBar组合组合、风格、ViewPagerIndicator、SherlockActionBar