显示启动画面后的离子安卓白屏 [英] ionic android white screen after showing the splash screen

查看:155
本文介绍了显示启动画面后的离子安卓白屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用离子cordova构建android 构建了一个apk文件。我已经使用Genymotion模拟器打开了该应用程序。当我打开应用程序时,它会启动并显示启动画面。之后一个白色的屏幕永远出现(我可以关闭应用程序。但是当我再次启动时,同样的事情发生)。

I have built an apk file using ionic cordova build android. And I have opened that app using Genymotion emulator. When I opened the app, it starts and displays the splash screen. After that a white screen appears forever (I can close the app. But when I start that again, same thing happens).

我已经在android工作室中捕获了错误安慰。

I have captured the error in the android studio console.

这里是,

然后我在那个apk中打开了main.js文件。在第40行,我找到了这段代码。

And then I have opened the main.js file in that apk. In line 40, I have found this code.

然后我在页面(./pages/scanner/scanner.ts)文件夹中浏览了scanner.ts。
我没有发现任何错误。它运行时使用 cordova运行浏览器

Then I browsed the scanner.ts in pages (./pages/scanner/scanner.ts) folder. I did not find anything wrong. It works when I run that using cordova run browser.

scanner.ts

以下是有关我的设置的更多信息:

Here are some more information on my setup:

npm list -g --depth=0
+-- babel@6.23.0
+-- babel-cli@6.24.1
+-- cordova@7.0.1
+-- ionic@3.5.0
-- nodemon@1.11.0

Installed platforms:
  android 4.0.0
  browser 4.1.0
Available platforms:
  blackberry10 ~3.8.0 (deprecated)
  webos ~3.7.0
  windows ~5.0.0

感谢阅读这篇文章。如果你知道是什么原因造成的。或者如何解决此问题,请告诉我。

Thanks for reading this post. If you know what causes this. Or how to resolve this issue, Please let me know.

推荐答案

从<$更改 tsconfig.json 中的目标值c $ c> es6 到 es5 已经有效。

例如。 target:es6 >>> target:es5

Changing the target value in the tsconfig.json from es6 to es5 has worked.
Eg. "target": "es6" >>> "target": "es5"


注意:除非您明确声明,否则项目不会自动发生此问题。


Note: This problem will not automatically happen to the project unless you declare that explicitly.

这篇关于显示启动画面后的离子安卓白屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆