1.生成keystore:在命令行下执行:
keytool -genkey -v -alias testAlias -keyalg RSA -keystore test.keystore -dname "CN=www.xxx.net,OU=xxx,O=xxx,L=beiijng,ST=beijing,C=china" -storepass 123456 -keypass 234567 -validity 36500
2.配置项目:在项目/platforms/android目录下新建debug-signing.properties文件,填入:
key.store=相对路径/test.keystore
key.alias=testAlias
key.store.password=**
key.alias.password=**
3.打包:在项目目录下执行,
cordova build android
在原文基础上有所修改,原文链接http://blog.youkuaiyun.com/yxl7808a/article/details/53139186