Android Studio升级3.6之后AndroidManifest.xml设置activity方向screenOrientation报错

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框架希望用户自己控制应用程序的方向,因此不建议限制应用程序的方向--例如,如果用户想在横向定位中使用应用程序,他只需翻转设备,传感器就可以完成这项工作,但当开发人员限制屏幕方向时,即使旋转传感器工作,应用程序也会保持预定义状态,这在某种程度上限制了用户的设备功能。

解决:

AndroidStudio->File->Settings->搜索Chrome,然后将Activity is locked to an orientation的勾选去掉

然后确定保存,如果保存完毕后还提示,重启下AS就可以了。

发布了24 篇原创文章 · 获赞 2 · 访问量 8190

猜你喜欢

转载自blog.csdn.net/Dragonlongbo/article/details/105348679