我正尝试从我的Mac中的cordova构建已签名的应用程序。每当我运行cordova build android --release
它释放未签名的apk。Android应用程序登录Cordova
我已在Play商店中创建帐户。此外,我检查了多个链接,让这个工作。
How to create a signed APK file using Cordova command line interface?
http://cordova.apache.org/docs/en/6.x/guide/platforms/android/index.html#signing-an-app
我有一个关于密钥文件很少关注。
根据科尔多瓦文档,我们可以使用build.json
或Gradle来构建签名的apk。
{
"android": {
"debug": {
"keystore": "../android.keystore",
"storePassword": "android",
"alias": "mykey1",
"password" : "password",
"keystoreType": ""
},
"release": {
"keystore": "../android.keystore",
"storePassword": "",
"alias": "mykey2",
"password" : "password",
"keystoreType": ""
}
}
}
以上代码来自科尔多瓦网站,但我无法找到build.json文件。
这是来自gradle的代码。
You can also specify signing properties by including a .properties file and pointing to it with the cdvReleaseSigningPropertiesFile and cdvDebugSigningPropertiesFile Gradle properties (see Setting Gradle Properties). The file should look like this:
storeFile=relative/path/to/keystore.p12
storePassword=SECRET1
storeType=pkcs12
keyAlias=DebugSigningKey
keyPassword=SECRET2
storePassword and keyPassword are optional, and will be prompted for if omitted.
但我不知道从哪里得到详细信息,如storePassword KeyPassword DebugSigningKey。
我正在使用最新版本的Cordova 7.0.1。
感谢您的回答。 – Ironic
我是否需要在json文件中提供secretpassword和其他详细信息,或者我需要使用上面的代码而不更改它。 – Ironic
你也可以使用jar签名器,然后将zip对齐。使用jar签名器时,它会提示你输入你的keyphrase。之后,你将不得不调整它 –