Ionic 启动画面后出现白屏

Dim*_*tri 2 android cordova ionic-framework

当我在模拟器(Android API 23 - Android 6.0)中使用 Android Studio 运行我的 android 应用程序时,屏幕在启动屏幕后保持在白色屏幕上。

我尝试了网上能看到的所有解决方案,但暂时没有任何结果......

这是一个新的空白应用程序,我没有添加新的组件或页面。

模拟器白屏

如果我在其他模拟器(Android API 30 - Android 11)中启动相同的应用程序,则该应用程序可以运行:

模拟器2工作

请问我有什么解决办法吗?:)

离子信息:

Ionic:

   Ionic CLI                     : 5.4.16
   Ionic Framework               : @ionic/angular 5.6.9
   @angular-devkit/build-angular : 12.0.4
   @angular-devkit/schematics    : 12.0.4
   @angular/cli                  : 12.0.4
   @ionic/angular-toolkit        : 4.0.0

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : android 9.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)

Utility:

   cordova-res : 0.15.3
   native-run  : 1.4.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\dimit\AppData\Local\Android\Sdk)
   NodeJS            : v14.16.1 (C:\laragon\bin\nodejs\node-v14\node.exe)
   npm               : 6.14.12
   OS                : Windows 10
Run Code Online (Sandbox Code Playgroud)

Dim*_*tri 5

经过长时间的搜索,我找到了解决方案。

在 tsconfig.json 文件中,将 target 替换为“es5”:

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es5",
    "module": "es2020",
    "lib": ["es2018", "dom"]
  },
  "angularCompilerOptions": {
    "enableI18nLegacyMessageIdFormat": false,
    "strictInjectionParameters": true,
    "strictInputAccessModifiers": true,
    "strictTemplates": true
  }
}
Run Code Online (Sandbox Code Playgroud)