Error inflating class android.support.v7.widget.Toolbar

建立程序的时候出现的错误

style.xml中的

   <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
    </style>

改为

<style name="AppTheme" parent="@style/Theme.AppCompat.NoActionBar">
   <item name="windowActionBar">false</item>
   <item name="android:windowNoTitle">true</item>
</style>

 也可以将Build Tools Version调到更小的版本,不能是23.0.2

原文地址:https://www.cnblogs.com/zhujiabin/p/5253058.html