离子2装置准备好在2000毫秒内没有开火
我正在IOS平台上的ionic 2 beta 11
内运行应用程序使用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.
任何有关这个的build议? 那究竟是什么问题?
这可能是由于几个问题,所以你不得不尝试几件事情:
- 运行
ionic state reset --platform
重新安装平台 - 在执行此
ionic state reset --plugins
之前,请通过运行ionic state reset --plugins
重新安装您的插件,请检查您的所有插件是否包含在package.json
文件中。 -
就像@joshmorony 在这里所说的那样,尝试通过改变
index.html
的Content-Security-Policy
来实现:<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的新版本中,应手动删除plugins
和platforms
文件夹。 然后运行:
ionic cordova prepare