Failed to find style 'coordinatorLayoutStyle' in current theme
I solved this rendering problem by simply inserting this line into the application theme (the app theme is usually placed in styles.xml).
[SDK 28]
<style name="AppTheme">
<item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item>
</style>
[SDK 27]
<style name="AppTheme">
<item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item>
</style>
As suggested by @Chris. If the IDE does not find the CoordinatorLayout in Widget.Support or Widget.Design, just start typing "CoordinatorLayout" and it should give you some options.
Failed to find style ... in current theme
You can copy the style name floatingactionbuttonstyle
and included it in your apptheme.
Add this line
<item name="floatingActionButtonStyle">@style/Widget.Design.FloatingActionButton</item>
And finally theme look like this
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="floatingActionButtonStyle">@style/Widget.Design.FloatingActionButton</item>
</style>
Just add the style name when error occured in layout editor & add the responding styles.
Here some other few elements am added in styles for others.
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="chipStyle">@style/Base.Widget.MaterialComponents.Chip</item>
<item name="chipGroupStyle">@style/Widget.MaterialComponents.ChipGroup</item>
<item name="bottomNavigationStyle">@style/Widget.Design.BottomNavigationView</item>
<item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item>
<item name="bottomAppBarStyle">@style/Widget.MaterialComponents.BottomAppBar</item>
<item name="floatingActionButtonStyle">@style/Widget.Design.FloatingActionButton</item>
</style>
You can add default style with style name. Then you resolve this error.
Failed to find style 'coordinatorLayoutStyle' in current theme (Render error)
Try adding the following style.
<style name="AppTheme.NoActionBar">
<item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item>
</style>
Related Topics
Creating a Searchview That Looks Like the Material Design Guidelines
Invoke-Customs Are Only Supported Starting with Android 0 --Min-API 26
Android Emulator Error Message: "Panic: Missing Emulator Engine Program for 'X86' Cpus."
Android What Does the Cliptopadding Attribute Do
How to Get City Name from Latitude and Longitude Coordinates in Google Maps
Webview, Add Local .CSS File to an HTML Page
Android Webview with an Embedded Youtube Video, Full Screen Button Freezes Video
How to Simulate :Active CSS Pseudo Class in Android on Non-Link Elements
What's Dp (Density Independent Pixels) Units with CSS
Scrollable Content Inside an HTML Does Not Scroll in Android Emulator or Phone
How to Scale a Website for Mobile Devices
Android/Webkit Text-Overflow: Ellipsis Not Working
Connecting Mongodb from Mobile or Browser Based Application
Android Getlastknownlocation Returns Null
How to Implement Filterable in Realmrecyclerviewadapter
Marking Sms Messages as Read/Unread or Deleting Messages Not Working in Kitkat