报错信息如下:counter_fragment_with_tab.xml:12: AAPT: error: '#ff._aapt: error: ">
赞
踩
- <android.support.design.widget.TabLayout
- android:id="@+id/tabs"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabBackground="#ff0000"
- />
报错信息如下:
Android resource linking failed
counter_fragment_with_tab.xml:12: AAPT: error: '#ff0000' is incompatible with attribute tabBackground (attr) reference [weak].
改在color.xml中定义颜色后,问题解决:
- <android.support.design.widget.TabLayout
- android:id="@+id/tabs"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabBackground="@color/colorPrimary"
- />
- <?xml version="1.0" encoding="utf-8"?>
- <resources>
- <
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。