Android Studio: Rendering Problems Missing styles-correct theme chosen for this layout, Failed to find style with id -


i want create card item xml layout cardview , getting error. common solutions here not worked (tried them , others similar posts).

this xml:

<relativelayout     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">      <android.support.v7.widget.cardview         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">       </android.support.v7.widget.cardview> </relativelayout> 

this relevant part of styles.xml:

<!-- base application theme. --> <style name="apptheme" parent="theme.appcompat.light.noactionbar">     <!-- customize theme here. -->     <item name="colorprimary">@color/primary</item>     <item name="colorprimarydark">@color/primary_dark</item>     <item name="coloraccent">@color/primary_accent</item> </style>  <!--theme tool bar (action bar)--> <style name="toolbartheme" parent="themeoverlay.appcompat.actionbar">     <item name="android:textcolorprimary">@color/white</item> </style> 

this relevant part manifest:

<application     android:allowbackup="true"     android:icon="@mipmap/ic_launcher"     android:label="@string/app_name"     android:theme="@style/apptheme" > 

this relevant part gradle build script:

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' 

and error:

enter image description here

thanks,

i facing same issue. please restart android studio selecting menu option "file" → "invalidate caches / restart". more details please follow link:

http://www.unknownerror.org/opensource/harvesthq/chosen/q/stackoverflow/13439486/missing-styles-is-the-correct-theme-chosen-for-this-layout


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -