'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". It says it is expecting "unspecified" or "fullSensor" to provide Chrome OS devices with a great experience. 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?



Solution 1:[1]

Maybe you can request orientation to onCreate method with this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

Solution 2:[2]

add this in manifest file for your activity

<activity android:screenOrientation="unspecified | fullSensor">

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Haechan
Solution 2 Fahmi Barguellil