我試圖在我的佈局中插入卡片視圖,但它給出了此渲染錯誤。無法構建卡片視圖
Missing styles.
Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout,
or fix the theme style references.
Failed to find style with id 0x7fff001a in current theme.
我已經列入本在應用程序的gradle產出:
- 編譯 'com.android.support:cardview-v7:23.1.0'
此外,我在款式中使用的主題是
- Theme.AppCompat.Light.NoActionBar
的styles.xml是在這裏:
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primaryColor</item>
<item name="colorPrimaryDark">@color/primaryColorDark</item>
<item name="colorAccent">@color/accentColor</item>
<item name="cardStyle">@style/CardView.Light</item>
</style>
的cardview是在這裏:關於風格
<android.support.v7.widget.CardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:cardCornerRadius="4dp"
app:elevation="5dp"/>
錯誤消息會談ID 0x7fff001a。它指的是什麼?
您是否爲活動和清單文件設置了主題? – Eoin