Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
看下报错的如下图:
这个意思是已经存在了actionBar,在mainfast里面添加一句代码就行了
<activity android:name=".popuwindow.PopuMenuActivity"
android:theme="@style/AppTheme.NoActionBar"
></activity> 在style语句里面添加一下
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false
</item>
<item name="windowNoTitle">true
</item>
</style>