15

在使用出现运行应用程序并收到以下消息后,我正在IOS平台ionic 2 beta 11上工作:ionic run ioswhite 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.

有什么建议吗?究竟是什么问题?

4

2 回答 2

10

这可能是由于几个问题而发生的,因此您必须尝试一些事情:

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

    <meta http-equiv="Content-Security-Policy" content="default-src gap://ready file://* *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *”&gt;
    
于 2016-12-09T12:51:45.697 回答
6

正如另一个答案的评论中提到的,在新版本的 CLI 中,您应该手动删除pluginsand文件夹。platforms然后运行:

ionic cordova prepare
于 2017-08-09T14:48:10.203 回答