簡體   English   中英

Ionic 啟動畫面后的白屏

[英]White screen after splash screen in Ionic

When I run my android app with Android Studio in Emulator (Android API 23 - Android 6.0), the screen stay on white screen after the splashScreen.

我嘗試了在 web 上可以看到的所有解決方案,但目前什么都沒有……

這是一個新的空白應用程序,我不添加新的組件或頁面。

模擬器中的白屏

如果我在其他模擬器中啟動相同的應用程序(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

經過長時間的搜索,我找到了解決方案。

在 tsconfig.json 文件中,將目標替換為“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
  }
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM