本文介绍了Ionic 2 设备就绪未在 2000 毫秒内触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在使用 ionic run ios
和 IOS
平台上使用
出现并收到以下消息:ionic 2 beta 11
>白屏
I'm working within ionic 2 beta 11
on IOS platforms after run the app using ionic run ios
a white screen
appear and got the below message:
Native: deviceready did not fire within 2000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
对此有什么建议吗?究竟是什么问题?
推荐答案
这可能是由于几个问题造成的,所以你必须尝试一些事情:
This could be happening due to several issues, so you'd have to try a few things:
- 通过运行
ionic state reset --platform
重新安装平台 - 在执行此操作之前,通过运行
ionic state reset --plugins
重新安装您的插件,请检查您的所有插件是否都包含在您的package.json
文件中. 就像@joshmorony 所说的此处,尝试更改
index.html
中的Content-Security-Policy
对于这个:
- Reinstall the platform by running
ionic state reset --platform
- Reinstall your plugins by running
ionic state reset --plugins
before doing this please check that all your plugins are included in yourpackage.json
file. Just like @joshmorony says here, try by changing the
Content-Security-Policy
from yourindex.html
for this one:
<meta http-equiv="Content-Security-Policy" content="default-src gap://ready file://* *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *">
这篇关于Ionic 2 设备就绪未在 2000 毫秒内触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!