Cordoba 6.4.0 Android error creating apk release

The project on cordova 6.3.1 worked well for me.

Then I updated the cordova and my project to 6.4.0. After that, the first time I built, gradle also automatically updated.

Now I have an important problem:

I need to include passwords for the keystore and aliases in the build.json file, or generating the apk release is not with an error.

I am using the build.json file as follows:

{ "android": { "debug": { "keystore": "C:\\Path\\To\\Keystores\\debug.keystore", "storePassword": "debugpass", "alias": "thedebugalias", "password" : "debugpass", "keystoreType": "" }, "release": { "keystore": "C:\\Path\\To\\Keystores\\theapp.keystore", "storePassword": "", "alias": "thealias", "password" : "", "keystoreType": "" } } 

}

And then run this command to generate release apk:

 cordova build android --release --buildConfig=build.json 

So far, this has worked well, and it has prompted me to enter key and alias passwords. And then built apk ok.

After upgrading to Cordova 6.4.0, it no longer works. It never asks for passwords, and then the build process fails because "the keystore has been changed or the password is incorrect."

If I include passwords in the build.json file, apk release will be generated normally, since it already has passwords and there is no need to request them.

I do not like to have the keystore passwords in text form in the build.json file. Has anyone experienced the same problem? Any ideas on how to fix this?

Thanks.

EDIT: I noticed another problem. It does not show my icons and screensavers. EDIT: This last issue regarding not displaying icons and splash screens is a bug in the new version of Cordoba, and it is being solved https://issues.apache.org/jira/browse/CB-12077

+6
source share
3 answers

This issue has been resolved: https://issues.apache.org/jira/browse/CB-12159

For now, you can use cordova platform add android@6.2.0-nightly.2016.12.9.6c60dc5d or cordova platform add https://github.com/apache/cordova-android

Keep in mind that the second command adds the latest version and may contain other errors ....

In the future you can use cordova platform add android@6.2.0 , but at the moment 6.2.0 does not exist. (Check here: https://github.com/apache/cordova-android/releases )

+3
source

Try changing build.gradle ' if (task.name == 'validateReleaseSigning') to if (task.name == 'assembleRelease') .
This is probably due to the gradle version update in the latest updates of cordova android.

Refresh . It looks like the validateReleaseSigning task name has been changed to validateSigningRelease in the new version of gradle: \

So, the problem should be fixed in the next version of the platform (the current one is 6.2.0-dev).

Update # 2 : PR was built, so you can use the cordova platform add https://github.com/apache/cordova-android for the moment (beware of unreleased versions).

+1
source

Can you put your password in your build.json file and see if it works.

 { "android": { "release": { "keystore": "path\\to\\keystore.keystore", "storePassword": "password", "alias": "alias", "password" : "password", "keystoreType": "" } } } 

I am on the same version as you, and this is my build.json.

Then I just switch to release and build the solution to get release.apk

I know cmd4life , I apologize if I was offended!

+1
source

Source: https://habr.com/ru/post/1011897/


All Articles