离子2设备准备好在2000ms内没有开火

时间:2016-10-13 07:01:45

标签: cordova ionic-framework ionic2 ionic3

我使用ionic 2 beta 11运行应用后,在 IOS 平台上的ionic run ios内工作 white screen ,并获得了以下消息:

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.

有关于此的任何建议吗?究竟是什么问题?

2 个答案:

答案 0 :(得分:10)

This could be happening due to several issues, so you'd have to try a few things:

  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' *”>
    

答案 1 :(得分:6)

如其他答案的评论中所述,在新版本的CLI中,您应手动删除pluginsplatforms文件夹。 然后运行:

ionic cordova prepare