我使用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.
有关于此的任何建议吗?究竟是什么问题?
答案 0 :(得分:10)
This could be happening due to several issues, so you'd have to try a few things:
ionic state reset --platform
ionic state reset --plugins
before doing this please check that all your plugins are included in your package.json
file.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中,您应手动删除plugins
和platforms
文件夹。
然后运行:
ionic cordova prepare