logcat 中的错误“无法从‘启动屏幕’读取 id 信息”是什么?

问题描述 投票:0回答:1

我在 Logcat 中有这个

2023-12-24 09:22:43.666   959-1051  BufferQueueDebug        pid-959                              E  [Splash Screen com.omarhadjsaiddev.qtappmanager#0](this:0xb40000780f8578d0,id:-1,api:0,p:-1,c:-1) id info cannot be read from 'Splash Screen com.omarhadjsaiddev.qtappmanager#0'

不知道问题出在哪里

android xml kotlin splash-screen logcat
1个回答
0
投票

您想做什么样的应用?它是哪个 Android API 版本?如果您向我们提供一些代码和其他信息,这将对我们有所帮助。

此问题是由 Android 12 以来的 Android 闪屏行为引起的。了解更多信息此处(迁移)此处(一般信息)。请按照此处的步骤在启动时显示启动屏幕。

如果您不想使用启动屏幕,您可以像这样在

res/values/styles.xml
中显式删除它以消除错误:

<resources>
  <style name="Theme.MyApp">
    <!-- other attributes... -->
    <item name="android:windowSplashScreenAnimatedIcon">@null</item>
    <item name="android:windowSplashScreenBackground">@null</item>
    <item name="android:windowSplashScreenIconBackgroundColor">@null</item>
  </style>
</resources>

请记住更新您的

AndroidManifest.xml
以使用此主题。将其添加到里面
<application>

android:theme="@style/Theme.MyApp"
© www.soinside.com 2019 - 2024. All rights reserved.