2

I work on cordova 5.x and i would generate a signing apk.

I start to use build.json at the root of the cordova project with certificat credentials :

{
  "android": {
   "debug": {
      "keystore": "cert.keystore",
      "storePassword": "*****",
      "alias": "1",
      "password" : "*****",
      "keystoreType": "PKCS12"
    },

It create a release-signing.properties in platforms/android like that :

key.store=..\\..\\cert.keystore
key.alias=1
key.store.password=*****
key.alias.password=*****
key.store.type=PKCS12

But i have an error : cert.keystore": DerInputStream.getLength(): lengthTag=109, too big (because it don't understand the key is a PKCS12 type)

After i write my own release-signing.properties like that :

storeFile=..\\..\\cert.keystore
storePassword=*****
keystoreType=PKCS12
keyAlias=1
keyPassword=*****

And it works ... so i don't understand why the first solution doesn't work.

3
  • Maybe it's the name : keystoreType = keystore.type Jun 18, 2015 at 10:08
  • are you trying to generate a release build? It seems like your build.json only specifies configs for a debug build. I only have a release config in my build.json file. When I run cordova build android --release, it generates the android-release.apk file in the appropriate directories Jun 30, 2015 at 18:18
  • I use release. The problem is the config file, android compile don't understand the cert key format. So i use another solution with "jarsigner" and zipalign, it's work Jul 3, 2015 at 8:59

1 Answer 1

5

On Cordova 5, there is no need to manually edit this "release-signing.properties" file.

You just need to save the "build.json" and the "cert.keystore" files at the root of your project (exactly like you already do). After that, run the command on cordova CLI:

cordova build android --release.

Furthermore, you should never touch any file inside the platform folder. In my case, I don't even trace them on my git repo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.