Ionic 2 构建的应用程序(IOS、Android)在启动时很慢

Ionic 2 builded application (IOS, Android) slow at boot up(Ionic 2 构建的应用程序(IOS、Android)在启动时很慢)
本文介绍了Ionic 2 构建的应用程序(IOS、Android)在启动时很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在使用 ionic 2、angular 2 和 typescript 构建应用程序.

I am building a app using ionic 2, angular 2 and typescript.

目前,已发布的应用程序(IOS 和 Android)在移动设备上的启动时间非常缓慢.

Currently, the released application(IOS & Android) boot up time very slow at the mobile devices.

即使是带有一些UI的启动模板在iPhone 6上也需要加载5秒,在oneplus 3上需要6秒.这个速度太慢了,不能接受.我的应用程序更复杂,需要大约 10 秒才能启动到首页.

Even the start template with some UI need to load 5 seconds at iPhone 6, 6 second on oneplus 3. This speed too slow and can't accept. My app is more complicated that takes like 10 second to boot to a front page.

我的启动应用程序的代码.

My code to start the app.

ionic start test --v2 --ts

启动时间能否提高到可接受的水平?

Can the boot time improved to a acceptable level?

推荐答案

Ionic 2 new RC4 改变了构建过程.现在可以使用 AoT 构建应用

Ionic 2 new RC4 changed the building process. Now app can be built with AoT using

ionic run android --prod

有关更多信息,请查看 ionic

For more info check out this issue on ionic

编辑

Ionic-cli 3 进一步模块化,cordova 命令需要ionic cordova.所以你需要像这样运行它

Ionic-cli 3 further modularize it and cordova commands needs ionic cordova. so you need to run it like

ionic cordova run android --prod

这篇关于Ionic 2 构建的应用程序(IOS、Android)在启动时很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
Resume game cocos2d(恢复游戏 cocos2d)
Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
[ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)
Storing and reading files from Documents directory iOS 5(从 Documents 目录存储和读取文件 iOS 5)
How can I implement a virtual joystick for a cocos2d game outside the cocos2d environment?(如何在 cocos2d 环境之外实现 cocos2d 游戏的虚拟摇杆?)