Coordinatorlayout - Failed To Resolve Attribute At Index 1 At Android.content.res.typedarray.getdrawable
Solution 1:
I got the same problem with you. And i try add this:
<stylename="AppTheme.NoActionBar"><itemname="windowActionBar">false</item><itemname="windowNoTitle">true</item><itemname="android:windowDrawsSystemBarBackgrounds">true</item><itemname="android:statusBarColor">@android:color/transparent</item></style>
to my activity's theme. it warns me that it require API 21 and above.
When i turn to AndroidStudio XML design view ,it show me a Rendering Problem:Missing style ... ?attr/colorPrimaryDark ...
So i change the style like this:
<stylename="AppTheme.NoActionBar"><itemname="windowActionBar">false</item><itemname="windowNoTitle">true</item><itemname="colorPrimary">@color/colorPrimary</item><itemname="colorPrimaryDark">@color/colorPrimaryDark</item><itemname="colorAccent">@color/colorAccent</item></style>
try add this. and it works for me.Hope that helps
Solution 2:
I found the solution and it's to create the following theme in your styles-v21.xml (it should already be there if you imported the sample files, but if it is not there, please create it):
<stylename="AppTheme.NoActionBar"><itemname="windowActionBar">false</item><itemname="windowNoTitle">true</item><itemname="android:windowDrawsSystemBarBackgrounds">true</item><itemname="android:statusBarColor">@android:color/transparent</item></style>
And calling it in the manifest, in the main activity part, as follows (delete the line I highlighted earlier and put this in its place):
android:theme="@style/AppTheme.NoActionBar">
thios should solve the probleme.
InflateException Error inflating class android.support.design.widget.CoordinatorLayout
Post a Comment for "Coordinatorlayout - Failed To Resolve Attribute At Index 1 At Android.content.res.typedarray.getdrawable"