My app only supports landscape mode (this is a business demand).
I have a layout xml file in the layout-land folder, but I did not bother to create a layout folder, since I explicitly disable portrait mode in the Android manifest file:
<activity android:name=".MainActivity"
android:screenOrientation="landscape">
</activity>
and yet in my layout xml file I get the said warning in mentioned in title (the app runs just fine despite the warning).
Is this just Android studio being stupid because it doesn't see that portrait is disabled in the manifest file? Can I safely disregard this warning? Or should I actually change something?
Also, as a side question, is there any way to make landscape the base orientation?" This whole warning stems from the fact that portrait is the base orientation, and if I can somehow make landscape the base orientation, then this warning will probably just go away.
I added an empty activity on a project to encounter this error message.
To fix it, go to Android Studio(version 4.1.2), select File -> Invalidate Caches and Restart...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With