android选择主题出错,Android Studio:渲染问题缺少样式 – 为此布局选择正确的主题,无法找到id的样式...

博主在尝试创建CardView的XML布局时遇到问题,错误信息未给出。已尝试过常见解决方案但无效。布局代码、styles.xml、AndroidManifest.xml和build.gradle文件的部分内容已显示,但具体错误未知。
摘要由CSDN通过智能技术生成

我想为CardView创建卡片项目xml布局并获得此错误。

Common solutions here没有工作(尝试他们全部和其他人从类似的帖子)。

这是我的xml:

xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:card_view="http://schemas.android.com/apk/res-auto"

android:layout_width="match_parent"

android:layout_height="match_parent">

xmlns:card_view="http://schemas.android.com/apk/res-auto"

android:id="@+id/card_view"

android:layout_width="match_parent"

android:layout_height="wrap_content"

card_view:cardCornerRadius="3dp"

card_view:cardElevation="4dp">

这是styles.xml的相关部分:

@color/primary

@color/primary_dark

@color/primary_accent

@color/white

这是清单的相关部分:

android:allowBackup="true"

android:icon="@mipmap/ic_launcher"

android:label="@string/app_name"

android:theme="@style/AppTheme" >

这是gradle构建脚本的相关部分:

compile 'com.android.support:appcompat-v7:23.0.1'

compile 'com.google.android.gms:play-services:8.1.0'

compile 'com.android.support:design:23.0.1'

compile 'com.android.support:cardview-v7:23.0.1'

compile 'com.android.support:recyclerview-v7:23.0.1'

这是错误:

11694c835c711cd3009ec813b6ed2ed7.png

谢谢,

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值