当前位置: 移动技术网 > 移动技术>移动开发>Android > android:screenOrientation=“portrait“ 一直警告报红

android:screenOrientation=“portrait“ 一直警告报红

2020年07月18日  | 移动技术网移动技术  | 我要评论

错误全文:

Expecting android:screenOrientation="unspecified" or "fullSensor" for this activity so the user can use the application in any orientation and provide a great experience on Chrome OS devices.

Google翻译:

此活动需要android:screenOrientation =“ unspecified”或“ fullSensor”,以便用户可以在任何方向上使用该应用程序,并在Chrome OS设备上提供出色的体验。
 

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

 

解决方法:
在application标签里,加入tool:ignore="LockedOrientationActivity"这句话,manifest标签里引入xmlns:tool="http://schemas.android.com/tools",记录下。


 

本文地址:https://blog.csdn.net/dodod2012/article/details/107409795

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网