Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expecting `android:screenOrientation="unspecified"` or `"fullSensor"

i updated android studio to 3.6 and updated gradle as well and having this error below

See Image Here

LOG PRINT

Error:(117, 13) 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.

i have found this solution but did't help me and this is answered 7 years ago for api level 9 and i am using API level 28

like image 462
Muhammad Hamza Avatar asked Feb 25 '20 07:02

Muhammad Hamza


People also ask

What is fullSensor orientation in android?

Try this: android:screenOrientation="fullSensor" The orientation is determined by the device orientation sensor. The orientation of the display depends on how the user is holding the device. This should be what you want. Also for more options check out this link-Activity Element.

How do I change the orientation of Android manifest?

The screen orientation attribute is provided by the activity element in the Android Manifest. Xml file. The orientations provided by the activity are Portrait, Landscape, Sensor, Unspecified and so on. To perform a screen orientation activity you define the properties in the Android Manifest.

What is Tools ignore LockedOrientationActivity?

Since as a part of functionality app supports portrait orientation, so added tools:ignore="LockedOrientationActivity" in the manifest to remove the lint warning related to screen orientation.


2 Answers

Easily add following lines to <manifest> tag of your AndroidManifest.xml

xmlns:tools="http://schemas.android.com/tools"
tools:ignore="LockedOrientationActivity"
like image 96
Aref Bahreini Avatar answered Oct 22 '22 07:10

Aref Bahreini


You can disable the check, here's how :

  1. Go to Settings -> Inspection
  2. Find "Chrome OS" (you can use the search bar on top left)
  3. Disable everything (see image below)
  4. Done

Disable Chrome OS Checking

like image 21
reidzeibel Avatar answered Oct 22 '22 08:10

reidzeibel