我正在尝试通过 Grails 服务器提供压缩应用程序来测试 Firefox OS 设备上的应用程序。该文件的服务方式如下:
response.setContentType("application/x-web-app-manifest+json")
File file = new File("/path/to/application/package.zip")
response.setHeader("Content-disposition", "attachment;filename=${file.name}")
response.outputStream << file.bytes
我可以在桌面浏览器上很好地下载 zip,而且它看起来也可以在设备上下载。下载后出现以下错误:
MANIFEST_PARSE_ERROR
下面看一下清单:
{
"version": "0.1",
"name": "App Name",
"description": "App Description",
"launch_path": "/target/index.html",
"icons": {
"16": "/img/icons/mortar-16.png",
"48": "/img/icons/mortar-48.png",
"128": "/img/icons/mortar-128.png"
},
"developer": {
"name": "Example Dev",
"url": "http://example.com"
},
"installs_allowed_from": ["*"],
"default_locale": "en",
"permissions": {
}
}