Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the

来源:互联网 发布:gtx950m4g独显数据 编辑:程序博客网 时间:2024/05/20 13:36

 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>

阅读全文
0 0
原创粉丝点击