安卓工作室 3.6。
我希望我的应用程序始终在 portrait
中模式。所以在我的AndroidMainfest.xml
:
<activity
android:name=".activity.SplashActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
我运行应用程序和
SplashActivity
显示在 portrait
模式。好的。但是编辑器显示以下错误:
Expecting android:screenOrientation="unspecified"
为什么?
最佳答案
在您的 list 标签中(在 xmlns:android="http://schemas.android.com/apk/res/android"
下方),输入
xmlns:tools="http://schemas.android.com/tools"
然后在应用程序标签内,放
tools:ignore="LockedOrientationActivity"
关于android - 在 AndroidManifest : Expecting android:screenOrientation ="unspecified",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58519021/