使用的是Android Studio 3.6.x,打开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.

原因

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

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

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

android studio 3.6.x 清单文件固定activity方向报红

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

1、在配置搜索"inspections"

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

3、应用,确定

 

相关文章:

  • 2021-05-03
  • 2021-09-07
  • 2021-08-05
  • 2021-10-25
  • 2021-05-16
  • 2022-12-23
  • 2021-10-17
  • 2021-06-28
猜你喜欢
  • 2022-01-02
  • 2021-07-02
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-12-19
  • 2021-06-21
相关资源
相似解决方案