在浏览器中打开Cordova应用程序时无法测试 [英] Can't test Cordova app when open it in browser

查看:568
本文介绍了在浏览器中打开Cordova应用程序时无法测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用4.3.0版本和iOS项目的项目创建了Cordova应用程序。

I created a Cordova app using the 4.3.0 version and the project for an iOS project.

每当我在桌面浏览器中打开 index.html (www文件夹)文件时,无限循环请求 gap:// ready

Whenever I open the index.html (www folder) file in a desktop browser, it gets stuck in an infinite loop requesting gap://ready.

为什么会发生这种情况?如何解决?

Why is this happening? How can I solve it?

非常感谢。

编辑和更新:

iOS应用程式无法运作,因为缺少外挂程式: https://github.com/apache/cordova-plugin-network-information/blob/master/doc/index.md

The iOS app was not working because there was a plugin missing: https://github.com/apache/cordova-plugin-network-information/blob/master/doc/index.md

我添加了它,然后再次构建项目,它工作。

I added it, then build the project again, and it worked.

推荐答案

您无法在普通浏览器上测试iOS项目,如果您想在浏览器上测试,请添加浏览器平台

You can't test an iOS project on a regular browser, if you want to test on a browser, add browser platform

cordova platform add browser

然后

cordova run browser

这篇关于在浏览器中打开Cordova应用程序时无法测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆