简体   繁体   English

如何将PhoneGap应用程序连接到Internet

[英]How to connect PhoneGap application to internet

I am coding applications using PhoneGap. 我正在使用PhoneGap编码应用程序。 In my apps I want to load sources from online using src="url" eg pictures, texts or the google reCHAPTA. 在我的应用程序中,我想使用src="url"从在线加载源,例如图片,文本或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=""/>

That's all I need, but the picture won't load when compiled into an android application. 那就是我所需要的,但是当编译成android应用程序时,图片将不会加载。

No error message... 没有错误讯息...

you have to add plugin whitelist 您必须添加插件白名单

open project parent folder in command prompt and run 在命令提示符下打开项目父文件夹并运行

cordova plugin add cordova-plugin-whitelist

Hope it helps! 希望能帮助到你!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM