当前位置: 首页 > 知识库问答 >
问题:

应用程序在android中运行时解锁后出现黑屏

濮阳鸿祯
2023-03-14

我想在锁定屏幕时保持屏幕方向和应用程序。

    null
11-14 18:55:26.132: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:26.132: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:26.132: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:26.132: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:26.132: V/WindowManager(3409): rotationForOrientationLw(orient=0, last=0); user=0 USER_ROTATION_LOCKED sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false mAccelerometerDefault=false gripRotationLock=false
11-14 18:55:26.142: D/SamsungWindowManager(3409): setRotationLw() : rotation=1
11-14 18:55:26.187: D/WindowManager(3409): performLayoutAndPlaceSurfacesLocked called before config changed.
11-14 18:55:26.217: D/CenterBarWindow(21578): onConfigurationChanged point = Point(1280, 720)
11-14 18:55:26.217: D/WindowManager(3409): performLayoutAndPlaceSurfacesLocked called before config changed.
11-14 18:55:26.477: I/WindowManager(3409): Screen frozen for +337ms due to Window{452f1008 u0 Starting net.herit.iotwm.smartphone}
11-14 18:55:27.062: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:27.062: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:27.062: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:27.062: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:27.062: V/WindowManager(3409): rotationForOrientationLw(orient=0, last=1); user=0 USER_ROTATION_LOCKED sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false mAccelerometerDefault=false gripRotationLock=false
11-14 18:55:30.532: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:30.532: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:30.532: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:30.532: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:30.532: V/WindowManager(3409): rotationForOrientationLw(orient=1, last=1); user=0 USER_ROTATION_LOCKED sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false mAccelerometerDefault=false gripRotationLock=false
11-14 18:55:30.547: D/SamsungWindowManager(3409): setRotationLw() : rotation=0
11-14 18:55:30.567: D/WindowManager(3409): performLayoutAndPlaceSurfacesLocked called before config changed.
11-14 18:55:30.587: D/WindowManager(3409): performLayoutAndPlaceSurfacesLocked called before config changed.
11-14 18:55:30.597: D/CenterBarWindow(21578): onConfigurationChanged point = Point(720, 1280)
11-14 18:55:30.807: I/WindowManager(3409): Screen frozen for +257ms due to Window{43593a68 u0 Keyguard}
11-14 18:55:31.287: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:31.287: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:31.287: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:31.287: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:31.287: V/WindowManager(3409): rotationForOrientationLw(orient=1, last=0); user=0 USER_ROTATION_LOCKED sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false mAccelerometerDefault=false gripRotationLock=false
11-14 18:55:32.472: E/SamsungWindowManager(3409): mCoreNumLockHelper.acquire
11-14 18:55:32.517: I/WindowManager(3409): Lock screen displayed!
11-14 18:55:34.717: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:34.717: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:34.717: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:34.717: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:34.717: V/WindowManager(3409): rotationForOrientationLw(orient=0, last=0); user=0 USER_ROTATION_LOCKED sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false mAccelerometerDefault=false gripRotationLock=false
11-14 18:55:34.727: D/SamsungWindowManager(3409): setRotationLw() : rotation=1
11-14 18:55:34.747: D/WindowManager(3409): performLayoutAndPlaceSurfacesLocked called before config changed.
11-14 18:55:34.757: D/WindowManager(3409): performLayoutAndPlaceSurfacesLocked called before config changed.
11-14 18:55:34.797: D/CenterBarWindow(21578): onConfigurationChanged point = Point(1280, 720)
11-14 18:55:34.902: I/WindowManager(3409): Screen frozen for +169ms due to Window{446612a8 u0 MultiWindowTrayService/AppListWindow 0}
11-14 18:55:35.337: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:35.337: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:35.337: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, mbResultFaceDectection: false
11-14 18:55:35.337: V/WindowOrientationListener(3409): mSContextAutoRotationListener.getProposedRotation, Rotation: -1
11-14 18:55:35.337: V/WindowManager(3409): rotationForOrientationLw(orient=0, last=1); user=0 USER_ROTATION_LOCKED sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false mAccelerometerDefault=false gripRotationLock=false

...
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="landscape"
...

共有1个答案

岳君之
2023-03-14

那么解决方法很简单:

把这个放进你的舱单里

<android:screenOrientation="landscape">
 类似资料:
  • 嘿,伙计们,我试图ru我的模拟器,但当我运行它,它给我这个错误: “安装下列Android SDK包失败,因为某些许可证尚未被接受。构建-工具;30.0.2 Android SDK构建-工具30.0.2若要构建此项目,请接受SDK许可协议并使用Android Studio SDK管理器安装缺少的组件。或者,若要将许可协议从一个工作站转移到另一个工作站,请参见http://d.Android.com

  • 在Android mobile上运行应用程序时出现此错误 正在调试模式下在DRA LX2上启动lib\main.dart...正在运行分级任务“Assemble Debug”...√build build\app\outputs\flutter-apk\app-debug.apk。正在安装build\app\outputs\flutter-apk\app.apk...错误:ADB退出,退出代码为1

  • 我在一个项目中工作,所以我有下面的代码: 但问题是,我得到了这个错误: 处理命令时发生未知的服务器端错误。原始错误:执行adbexec时出错。原始错误:“command”c:\users\dnkos\appdata\local\android\sdk\platform-tools\adb.exe-p 5037-s emulator-5554 install-r c:\users\dnkos\app

  • 我是爱奥尼亚的新手。当我在ionic 4中开始我的第一个项目时,它与web ionic serve的命令配合得很好,但在ionic cordova运行android的情况下,它在模拟器上只显示白色屏幕 项目结构: 我只创建了主组件 我尝试过的解决方案 1.删除平台而不是再次添加它ionic cordova-Platform rm android ionic cordova-Platform add

  • 没有声音空安全的建筑物 有关更多信息,请参见 https://dart.dev/null-safety/unsound-null-safety 预期的元素是 “WidgetsBinding”来自“package:flutter/src/widgets/binding”。dart”(“/C:/src/flutter/packages/flutter/lib/src/widgets/binding.d