I had a problem in creating a new project in Android studio 3.1.3, whenever I created a project the design layout will throw an error message:
Failed to load AppCompat ActionBar with unknown error.
error screenshot:
warning screenshot:
style.xml (while error)-->
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
And I solved with by adding:
style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"
As showed in a other post
But when I needed to add a toolbar I stuck with the error:
android/view/view$onUnhandledKeyEventListener
error screenshot:
The problem is the app doesn't have actionbar, even though the style.xml have the appropriate code and toolbar never shows up even by changing the Layout_width, Layout_height and by constrainting it to the constraint layout.