[英]Can no longer use screenOrientation portrait after Android Studio upgrade
I have just upgraded Android Studio and am now getting an error on android:screenOrientation="portrait".我刚刚升级了 Android Studio,现在在 android:screenOrientation="portrait" 上出现错误。 It says it is expecting "unspecified" or "fullSensor" to provide Chrome OS devices with a great experience.
它表示希望“未指定”或“fullSensor”能够为 Chrome OS 设备提供出色的体验。 Is there some way around this?
有没有办法解决这个问题? I have tried putting in the manifest but that doesn't work.
我曾尝试放入清单,但这不起作用。 What am I missing, portrait still appears to be an option in the documentation?
我错过了什么,肖像似乎仍然是文档中的一个选项?
也许您可以使用 this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); 请求 onCreate 方法的方向。
"将此添加到您的活动的清单文件中
<activity android:screenOrientation="unspecified | fullSensor">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.