在Cordova v-5.0 CLI中签名APK文件不工作 [英] Signing APK file in Cordova v-5.0 CLI is not working
问题描述
我试图将密钥库属性添加到 platforms / android 目录中的两个文件中。
key.store = Users / admin / workspace / android-keystore / keystore
key.alias = keystore
到
ant.properties
和
project.properties
文件。
在以前的版本中工作得很好,但似乎Cordova没有使用如果我运行命令:
cordova build android --release
我总是只得到未签名的apk。
platforms / android / build / outputs / apk / android-release-unsigned.apk
我如何解决它?
非常感谢任何帮助。
由于cordova现在使用gradle,因此您需要在平台/ android /目录中创建一个名为release-signing.properties的文件
设置如下:
storeFile = relative / path / to / keystore.p12
storePassword = SECRET1
storeType = pkcs12
keyAlias = DebugSigningKey
keyPassword = SECRET2
您还可以使用JKS文件:
storeType = jks
storeFile = mykeystore.keystore
有关详细信息,请参阅:
https://cordova.apache.org/docs/en/edge/guide_platforms_android_tools.md.html
i tried to add keystore properties into two files in the platforms/android directory.
key.store=Users/admin/workspace/android-keystore/keystore
key.alias=keystore
into
ant.properties
and
project.properties
File.
It worked fine in previous version, but not seems like the Cordova does not using ant in latest version.
So if i run command:
cordova build android --release
I always get only unsigned apk.
platforms/android/build/outputs/apk/android-release-unsigned.apk
How can i solve it please?
Many thanks for any help.
Because cordova now uses gradle, you need to create a file called release-signing.properties in your platforms/android/ directory
The settings looks like:
storeFile=relative/path/to/keystore.p12
storePassword=SECRET1
storeType=pkcs12
keyAlias=DebugSigningKey
keyPassword=SECRET2
You can also use JKS files:
storeType=jks
storeFile=mykeystore.keystore
For more information see: https://cordova.apache.org/docs/en/edge/guide_platforms_android_tools.md.html
这篇关于在Cordova v-5.0 CLI中签名APK文件不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!