android 8.0 (API=26) 出现的问题

解决方法:

  1. 去掉android:screenOrientation;
  2. android:windowIsTranslucent 改为false; 如果需要透明的设置加上android:windowDisablePreview =true;
    在项目res目录下创建values-v26/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="AppTheme.Start" parent="AppTheme">
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowFullscreen">true</item>
      
        <!-- 适配android手机系统8.0(api26),Only fullscreen opaque activities can request orientation -->
        <!--用背景图消除启动白屏-->
        <item name="android:windowBackground">@mipmap/background</item>
        <item name="android:windowIsTranslucent">false</item>
        <item name="android:windowDisablePreview">true</item>
    </style>
</resources>