Android Studio Manifest.xml错误提示:Expecting 'android:screenOrientation="unspecified"' or '"fullSensor"' for this activity

时间:2022-06-01 16:34:40

使用的是Android Studio 3.6,打开Manifest.xml,存在以下错误提示:

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.

原因

这是一种警告,提示我们,对于大屏幕设备,不建议限制方向。

限制竖屏,屏蔽提示的解决方法

如果确实要限制为竖屏,可以按以下步骤:

  • Mac: Android Studio -> Preferences
  • Windows: File -> Settings

1、在配置搜索"chrome"

2、把"Activity is locked to an orientation"勾选去掉

3、应用,确定

Android Studio Manifest.xml错误提示:Expecting 'android:screenOrientation="unspecified"' or '"fullSensor"' for this activity