Cordova 离子2装置就绪在2000毫秒内未点火

Cordova 离子2装置就绪在2000毫秒内未点火,cordova,ionic-framework,ionic2,ionic3,Cordova,Ionic Framework,Ionic2,Ionic3,在使用爱奥尼亚运行IOS运行应用程序后,我在爱奥尼亚2 beta 11IOS平台上工作,出现白色屏幕并收到以下消息: 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. 有什么建议吗?到底是什么问题?这可能是由于几个问题

在使用
爱奥尼亚运行IOS
运行应用程序后,我在
爱奥尼亚2 beta 11
IOS平台上工作,出现
白色屏幕
并收到以下消息:

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.

有什么建议吗?到底是什么问题?

这可能是由于几个问题造成的,因此您必须尝试一些方法:

  • 通过运行离子状态重置-平台重新安装平台
  • 通过运行
    ionic state reset--plugins
    重新安装插件在执行此操作之前,请检查您的
    package.json
    文件中是否包含所有插件
  • 正如@joshmorony所说,尝试将
    内容安全策略
    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' *”>
    

    如另一个答案的评论中所述,在新版本的CLI中,您应该手动删除
    插件
    平台
    文件夹。 然后运行:

    ionic cordova prepare
    

    根据这两个线程:and,不推荐使用
    状态
    命令。相反,在添加平台和插件时,
    --save
    用于将其添加到
    config.xml
    。要重置插件和平台,请删除相应的文件夹并发布
    ionic prepare
    ionic state reset--plugins
    以快速的方式解决了我的问题,谢谢其中一个对我有效。我使用的是带有21个插件的ionic 1,除非您有项目的副本,否则请不要删除/重置插件。因为有时候当你尝试添加插件时,会出现非常奇怪的错误,尤其是像Cordova push这样的插件。我尝试了以上所有方法,但没有任何效果。@Vasanth您可以删除平台,然后再次添加插件。它抛出了什么错误?