打包Chrome扩展为crx时报错“打包扩展程序错误”:

The 'manifest_version' key must be present and set to 2 (without quotes). See developer.chrome.com/extensions/manifestVersion.html for details.

这个是因为Chrome在18以后升级了manifest的版本,个别扩展应用还是使用原来的版本,打包时才会出现这个问题。

解决方法很简单,在

%AppData%Local\Google\Chrome\User Data\Default\Extensions\扩展ID\扩展版本号

目录下找到manifest.json文件,打开并在大括号中添加一下属性;

"manifest_version": 2,

位置随意,即可解决。