In AndroidManifest: Expecting android:screenOrientation=“unspecified”

前端 未结 11 892
隐瞒了意图╮
隐瞒了意图╮ 2021-02-02 04:59

Android Studio 3.6.

I want my app to be always in portrait mode. So in my AndroidMainfest.xml:



        
11条回答
  •  春和景丽
    2021-02-02 06:03

    I have used the below Procedure. It works perfectly for me. In Android studio 3.6.0 I think they want the user to handle the orientation and encourage the developer to use ViewModel stuff. Use the below Procedure to ignore that.

    Firstly Add :

    xmlns:android="http://schemas.android.com/apk/res/android"
    

    in the manifest tag.

    Secondly, Add

    tools:ignore="LockedOrientationActivity" 
    

    in application tag. Happy Coding.

提交回复
热议问题