andriod 8.0 啓動就奔潰了,無法啓動,查看日誌後發現Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation,(log查看方式:adb logcat -I)
也就是說android 8.0 透明的activity 不能繼續使用
綜合其他大神的結論:
把android 下面的src下面的main下面res下面values下面的styles文件
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<!--設置透明背景-->
<item name="android:windowIsTranslucent">false</item>
<item name="android:windowDisablePreview">true</item>
</style>
</resources>
windowIsTranslucent改爲windowDisablePreview就能起到一樣子的效果了,且應用不會崩潰了。
、
重新打包,即可