Javascript 谷歌API提要不是';t使用PhoneGap/Android

Javascript 谷歌API提要不是';t使用PhoneGap/Android,javascript,android,html,eclipse,cordova,Javascript,Android,Html,Eclipse,Cordova,我编写的html和JavaScript代码使用Google API提要,在浏览器上100%工作,但在PhoneGap/Android中不工作。需要做些什么才能让PhoneGap正常工作 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" href="styleta

我编写的html和JavaScript代码使用Google API提要,在浏览器上100%工作,但在PhoneGap/Android中不工作。需要做些什么才能让PhoneGap正常工作

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="styletable.css">
<title>RSS Feeds Demonstration</title>

<script type="text/javascript" src="http://www.google.com/jsapi">
</script>

<script type="text/javascript">
google.load("feeds", "1")
</script>



</head>

<body>
<!-- NPR Business RSS URL - http://www.npr.org/rss/rss.php?id=1006 -->

<script type="text/javascript">
/*function lunchboxOpen(lunchID) {
document.getElementById('lunch_' + lunchID).style.display = "block";
document.getElementById('clasp_' + lunchID).innerHTML="<a href=\"javascript:lunchboxClose('" + lunchID + "');\"><img src='close.png' height='50' width='50'/></a>";
}
function lunchboxClose(lunchID) {
document.getElementById('lunch_' + lunchID).style.display = "none";
document.getElementById('clasp_' + lunchID).innerHTML="<a href=\"javascript:lunchboxOpen('" + lunchID + "');\"><img src='open.png' height='50' width='50'/></a>";
}*/
var feedcontainer=document.getElementById("feed");
var feedurl="http://accuratefx.com.lb/index.php/education/news-feed?format=feed&type=rss";
var feedlimit=10;


function rssfeedsetup(){
var feedpointer=new google.feeds.Feed(feedurl);
feedpointer.setNumEntries(feedlimit) ;
feedpointer.load(displayfeed) ;
}
//publishedDate
function displayfeed(result){
if (!result.error){
var thefeeds=result.feed.entries;
var html = thefeeds[0].content;
var re = /<img[^>]+src="http:\/\/([^">]+)/g
var results = re.exec(html);
if(results==null){
source = "img/logo.png";
document.getElementById("img1").src=source;
}
else{
var source = results[1];
source ="http://"+source;
document.getElementById("img1").src=source;
}
var theDiv = document.getElementById("title1");
theDiv.innerHTML += thefeeds[0].title;
var theDiv = document.getElementById("date1");
theDiv.innerHTML +=  thefeeds[0].publishedDate;


var html = thefeeds[1].content;
var re = /<img[^>]+src="http:\/\/([^">]+)/g
var results = re.exec(html);
if(results==null){
source = "img/logo.png";
document.getElementById("img2").src=source;
}
else{
var source = results[1];
source ="http://"+source;
document.getElementById("img2").src=source;
}
var theDiv = document.getElementById("title2");
theDiv.innerHTML +=  thefeeds[1].title;
var theDiv = document.getElementById("date2");
theDiv.innerHTML +=  thefeeds[1].publishedDate;



var html = thefeeds[2].content;
var re = /<img[^>]+src="http:\/\/([^">]+)/g
var results = re.exec(html);
if(results==null){
source = "img/logo.png";
document.getElementById("img3").src=source;
}
else{
var source = results[1];
source ="http://"+source;
document.getElementById("img3").src=source;
}
var theDiv = document.getElementById("title3");
theDiv.innerHTML +=  thefeeds[2].title;
var theDiv = document.getElementById("date3");
theDiv.innerHTML +=  thefeeds[2].publishedDate;


.....

RSS源演示
加载(“提要”,“1”)
/*功能午餐盒打开(午餐ID){
document.getElementById('sunch_u'+sunchId).style.display=“block”;
document.getElementById('clasp_'+午餐ID).innerHTML=“”;
}
函数午餐盒关闭(午餐ID){
document.getElementById('sunch_u'+sunchId).style.display=“无”;
document.getElementById('clasp_'+午餐ID).innerHTML=“”;
}*/
var feedcontainer=document.getElementById(“提要”);
var feedurl=”http://accuratefx.com.lb/index.php/education/news-feed?format=feed&type=rss";
var feedlimit=10;
函数rssfeedsetup(){
var feedpointer=new google.feeds.Feed(feedurl);
feedpointer.setNumEntries(feedlimit);
feedpointer.load(displayfeed);
}
//出版日期
函数displayfeed(结果){
如果(!result.error){
var offeeds=result.feed.entries;
var html=offeeds[0]。内容;
变量re=/]+)/g
var results=re.exec(html);
如果(结果==null){
source=“img/logo.png”;
document.getElementById(“img1”).src=source;
}
否则{
var来源=结果[1];
source=“http://”+source;
document.getElementById(“img1”).src=source;
}
var theDiv=document.getElementById(“title1”);
theDiv.innerHTML+=offeeds[0]。标题;
var theDiv=document.getElementById(“日期1”);
theDiv.innerHTML+=offeeds[0].publishedDate;
var html=offeeds[1]。内容;
变量re=/]+)/g
var results=re.exec(html);
如果(结果==null){
source=“img/logo.png”;
document.getElementById(“img2”).src=source;
}
否则{
var来源=结果[1];
source=“http://”+source;
document.getElementById(“img2”).src=source;
}
var theDiv=document.getElementById(“title2”);
theDiv.innerHTML+=offeeds[1]。标题;
var theDiv=document.getElementById(“日期2”);
theDiv.innerHTML+=offeeds[1]。publishedDate;
var html=offeeds[2]。内容;
变量re=/]+)/g
var results=re.exec(html);
如果(结果==null){
source=“img/logo.png”;
document.getElementById(“img3”).src=source;
}
否则{
var来源=结果[1];
source=“http://”+source;
document.getElementById(“img3”).src=source;
}
var theDiv=document.getElementById(“title3”);
theDiv.innerHTML+=offeeds[2]。标题;
var theDiv=document.getElementById(“date3”);
theDiv.innerHTML+=offeeds[2]。publishedDate;
.....
我把结果放在表格里,当我用谷歌chrome和Fire Fox启动它时,它工作得很好。
在PhoneGap中,我使用api的链接进行了复制。在我的PhoneGap项目中,我没有这样一个模板,我用菜单和选项购买了它。rss提要在选项3中。

你能发布你的代码吗?另外,列出你得到的任何错误是否有与Google api相关联的主机名?