使用的是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.
這是一種警告,提示我們,對於大屏幕設備,不建議限制方向。
解決方法:
- 不設置屏幕的方向
- 設置屏幕放在,添加忽略屬性:
tools:ignore="LockedOrientationActivity"
- 打開設置,搜索chrom,把"Activity is locked to an orientation"勾選去掉,點擊確定