如何将PhoneGap应用程序连接到Internet [英] How to connect PhoneGap application to internet

查看:87
本文介绍了如何将PhoneGap应用程序连接到Internet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PhoneGap编写应用程序代码.在我的应用程序中,我想使用src="url"从网上加载源图片,文字或Google reCHAPTA.在我的浏览器中对其进行测试,可以很好地运行,但是在我的智能手机上,作为应用程序,图片将无法加载.

I am coding applications using PhoneGap. In my apps I want to load sources from online using src="url" e.g. pictures, texts or the google reCHAPTA. Testing it in my browser it works perfectly fine but on my smartphone, as an app, the pictures won't load.

有人可以帮助我吗?我必须安装插件吗?如果可以,怎么办?

Can anyone help me? Do I have to install a plugin? If so, how?

我还没有在线找到任何帮助...:(

I haven't found any help online yet... :(

<img src="https://www.____.de/___/" alt=""/>

这就是我所需要的,但是当编译到android应用程序中时,图片将不会加载.

That's all I need, but the picture won't load when compiled into an android application.

没有错误消息...

推荐答案

您必须添加插件白名单

在命令提示符下打开项目父文件夹并运行

open project parent folder in command prompt and run

cordova plugin add cordova-plugin-whitelist

希望有帮助!

这篇关于如何将PhoneGap应用程序连接到Internet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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