我有一个很少依赖的大项目,我也想添加v7 gridlayout支持库,但在那之后,我再也无法构建我的项目了。
在build.gradle中添加这样的库(我使用的是Android Studio 1.5.1):
compile 'com.android.support:gridlayout-v7:21.0.0'
同步项目工作,但之后我找不到android.support.v7.widget.GridLayout
,当我尝试构建我的项目时出现以下错误:
C:\Users\jgully\AndroidStudioProjects\swingmobile\SwingMobileEngine\res\values\colors.xml
> Error:(2) Attribute "orientation" has already been defined
Error:Execution failed for task ':SwingMobileEngine:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\jgull\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1
所以我怀疑在两个不同的家属中声明了两次属性,但我不知道如何解决这个问题。
我在viewpagerindicator找到了一个类似的问题:Error:Attribute "android:orientation" has already been defined
colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="blue_light">#2D9DC8</color>
<color name="blue_dark">#314d61</color>
<color name="white">#FFFFFF</color>
<color name="green_light">#308A24</color>
<color name="black">#000000</color>
<color name="black_light">#333</color>
<color name="grey_light">#A1A1A1</color>
<color name="red">#C20031</color>
<color name="green_dark">#496948</color>
<color name="grey">#363636</color>
<color name="grey_dark">#424242</color>
<color name="grey_dark_alpha_50">#88424242</color>
<color name="vpi__background_holo_dark">#ff000000</color>
<color name="vpi__background_holo_light">#fff3f3f3</color>
<color name="vpi__bright_foreground_holo_dark">@color/vpi__background_holo_light</color>
<color name="vpi__bright_foreground_holo_light">@color/vpi__background_holo_dark</color>
<color name="vpi__bright_foreground_disabled_holo_dark">#ff4c4c4c</color>
<color name="vpi__bright_foreground_disabled_holo_light">#ffb2b2b2</color>
<color name="vpi__bright_foreground_inverse_holo_dark">
@color/vpi__bright_foreground_holo_light
</color>
<color name="vpi__bright_foreground_inverse_holo_light">
@color/vpi__bright_foreground_holo_dark
</color>
<!-- To override values in legacy projects (if needed) -->
<color name="dialog_default_text_color">#ffffff</color>
<color name="dialog_default_background_color">#000000</color>
<!-- end of to override values in legacy projects (if needed) -->
<!-- Listview gray divider -->
<drawable name="listview_graydivider">#CCCCCC</drawable>
<!-- Gradient values (Default is SWB) -->
<color name="default_dialog_gradient_firstcolor">#868686</color>
<!-- FFA938 -->
<color name="default_dialog_gradient_secondcolor">#a5a5a5</color>
<!-- FFAF47 -->
<color name="default_dialog_gradient_thirdcolor">#5b5b5b</color>
<!-- D4831A -->
<color name="default_dialog_gradient_fourthcolor">#727272</color>
<!-- F29729 -->
<color name="default_dialog_gradient_dark_firstcolor">#222222</color>
<!-- A97025 -->
<color name="default_dialog_gradient_dark_secondcolor">#2b2b2b</color>
<!-- A9732E -->
<color name="default_dialog_gradient_dark_thirdcolor">#181818</color>
<!-- B55711 -->
<color name="default_dialog_gradient_dark_fourthcolor">#1e1e1e</color>
<!-- 9F6314 -->
项目的所有家属
注意:我不是这个项目开头的作者,我也不知道使用了哪些lib