gpt4 book ai didi

android - Ionic 启动画面后出现白屏

转载 作者:行者123 更新时间:2023-12-03 08:20:44 25 4
gpt4 key购买 nike

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

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

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

White screen in emulator

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

Emulator 2 work

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

ionic 信息:

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 文件中,将 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
}
}

关于android - Ionic 启动画面后出现白屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67938101/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com