android studio 3.6.x 清單文件固定activity方向報紅

使用的是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.

原因

這是一種警告,提示我們,對於大屏幕設備,不建議限制方向。

限制豎屏,屏蔽提示的解決方法

如果確實要限制爲豎屏,可以按以下步驟:

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

1、在配置搜索"inspections"

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

3、應用,確定

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章