2011-08-23 160 views
1

我爲chrome創建了擴展,我想自行更新。但是,我無法這樣做。有人可以告訴我我的錯誤?Chrome擴展程序自動更新

manifiest.json:

"update_url":"http://myhost.com/update.xml", 
"version":"0.0.5.0" 

update.xml:

<gupdate xmlns="http://www.google.com/update2/response" protocol="2.0"> 
<app appid="apoelbpnfhemjmnfkejmnfmdfhfhblii"> 
<updatecheck codebase="http://myhost.com/extension.crx" version="0.0.5.1"/> 
</app> 
</gupdate> 

很抱歉,如果我犯了錯,但我不是以英語爲母語。

回答

1

夫婦的建議...

我覺得應該update.xml在頂部有<?xml version='1.0' encoding='UTF-8'?>(如果它不!)

在你的示例代碼,代碼庫值有myhost.com作爲主機 - 在'真正的'update.xml中這是否正確?

上述版本在manifest.json和update.xml之間是不同的 - 在這裏是故意的嗎?

+0

我遇到了同樣的問題,並且頂部有'<?xml version ='1.0'encoding ='UTF-8'?>'。我也有正確的url作爲codebase和manifest和update.xml之間的版本匹配。你自己看。 xml:https://raw.github.com/shawninder/Flags/master/chromeExtensionUpdates.xml,清單:https://raw.github.com/shawninder/Flags/master/chromeExtension/manifest.json – Shawn