Expecting android:screenOrientation=unspecified or fullSensor for this activity

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

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

解決方法:

  1. 不設置屏幕的方向
  2. 設置屏幕放在,添加忽略屬性:
tools:ignore="LockedOrientationActivity" 
  1. 打開設置,搜索chrom,把"Activity is locked to an orientation"勾選去掉,點擊確定
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章