简体   繁体   English

在Eclipse中构建phonegap项目

[英]Building phonegap project in eclipse

I have built a phone gap project in eclipse and it runs fine on my device. 我在Eclipse中建立了一个电话缺口项目,并且在我的设备上运行良好。 I have also built a gwt app and I can drop the js it generates into my phonegap app and it runs fine. 我还构建了一个gwt应用程序,可以将它生成的js放到phonegap应用程序中,并且运行良好。 What I want now is to create my ui/app using get and have it deploy the generated javascript straight to my device. 我现在想要的是使用get创建我的ui / app,并将其直接将生成的javascript部署到我的设备上。 Is this possible in eclipse or only via an ant script? 这是否有可能在Eclipse中或仅通过ant脚本?

If you're asking if you can update the web content in your PhoneGap app without re-compiling it in Eclipse, the answer is no. 如果您询问是否可以更新PhoneGap应用程序中的Web内容而无需在Eclipse中重新编译,则答案是否定的。 The web content in your app is stored within the .apk and gets signed before being loaded onto your device. 您应用中的网络内容存储在.apk并在加载到设备上之前经过签名。 The .apk cannot be re-signed on the device. .apk无法在设备上重新签名。

An alternative to this is to host your app's web content on a remote server and have your PhoneGap webview load from that server location. 替代方法是将应用程序的Web内容托管在远程服务器上,并从该服务器位置加载PhoneGap Webview。 Just set the remote location as your first parameter in your super.loadUrl() call. 只需将远程位置设置为super.loadUrl()调用中的第一个参数。

Remember to whitelist your domain in your app settings. 请记住在应用设置中将您的域列入白名单。 Documentation on whitelisting can be found here . 有关白名单的文档可在此处找到。

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

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