Ionic 2 设备就绪未在 2000 毫秒内触发 [英] Ionic 2 device ready did not fire within 2000ms

查看:30
本文介绍了Ionic 2 设备就绪未在 2000 毫秒内触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 ionic run iosIOS 平台上使用 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:

  1. 通过运行ionic state reset --platform
  2. 重新安装平台
  3. 在执行此操作之前,通过运行 ionic state reset --plugins 重新安装您的插件,请检查您的所有插件是否都包含在您的 package.json 文件中.
  4. 就像@joshmorony 所说的此处,尝试更改 index.html 中的 Content-Security-Policy对于这个:

  1. Reinstall the platform by running ionic state reset --platform
  2. Reinstall your plugins by running ionic state reset --plugins before doing this please check that all your plugins are included in your package.json file.
  3. Just like @joshmorony says here, try by changing the Content-Security-Policy from your index.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 毫秒内触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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