Cordova 6.4.0 Android error when building release apk

前端 未结 3 1312
隐瞒了意图╮
隐瞒了意图╮ 2021-01-12 17:46

I had a project working well on cordova 6.3.1 .

Then I updated cordova and my project to 6.4.0 . After this, first time I built, gradle got automatically updated to

相关标签:
3条回答
  • 2021-01-12 18:14

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

    As of 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 it may introduce other bugs....

    In the future you may use cordova platform add android@6.2.0 but as of now 6.2.0 does not exist. (Check here: https://github.com/apache/cordova-android/releases)

    0 讨论(0)
  • 2021-01-12 18:16

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

    Update: It seems that validateReleaseSigning task name was changed to validateSigningRelease in the newer Gradle version :\

    So, the issue should be fixed in a next platform release (current is 6.2.0-dev).

    Update #2: The PR was merged so you can use cordova platform add https://github.com/apache/cordova-android for now (beware of unreleased versions though).

    0 讨论(0)
  • 2021-01-12 18:24

    Can you put your password into your build.json and see if works.

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

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

    I then just change to release and build solution to get release.apk

    I know cmd4life, apologies if offended!

    0 讨论(0)
提交回复
热议问题