设置横屏之后爆红异常处理-Android

TOC

设置横屏之后爆红异常处理-Android

http://www.10qianwan.com/articledetail/631426.html
https://blog.csdn.net/Stephen2Wong/article/details/105582351

原因:Androidstudio更新后对规则更严厉,期望开发者适配横竖屏,以便更好支持日后的Chrome OS生态。

在application标签里,加入:
tool:ignore="LockedOrientationActivity"
之后由于没有tool命名空间所以会异常,需要在顶部的manifest标签里引入:
xmlns:tool="http://schemas.android.com/tools"
posted @ 2021-03-09 18:12  紫月java  阅读(102)  评论(0编辑  收藏  举报