在xml文件中添加'cardView'时出错

时间:2016-01-19 22:54:34

标签: android xml android-cardview

我得到的错误是:

Failed to find style with id 0x7fff0020 in current theme

这是我的xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.echodevteam.isaac.echo_simplyawesome.Login"
android:background="#FFF">

<android.support.v7.widget.CardView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

</android.support.v7.widget.CardView>


</RelativeLayout>

这是我的主题:

<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="EchoTheme">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

这已经在我的朋友中了:

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'

我想知道如何修复此错误。由于我是android的新手,我请求具体一点。谢谢!

0 个答案:

没有答案