SigningConfig “release” is missing required property “keyPassword”

佐手、 提交于 2021-01-05 06:03:30

问题


The error complains that I have not set the signingConfig.release.keyPassword, however I am setting it.

I already tried hardcoding the password instead retrieving it from the key.properties file however that didn't help.

// build.gradle file  

// ... the rest of the build code

android {        

    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
} 

回答1:


try this: In build.gradle(Module: app)

// ... the rest of the build code

android {

    signingConfigs {
        release {
            storeFile file('your_key_store_path')
            storePassword 'your_store_password'
            keyAlias = 'your_key_alias'
            keyPassword 'your_key_password'
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
}

Also you can create Signing Configs in Android Studio:
File > Project Structure > Select Modules > Select Signing Configs. In Signing Configs, there is debug config is already created but you can create a new one by pressing the + icon.



来源:https://stackoverflow.com/questions/57883438/signingconfig-release-is-missing-required-property-keypassword

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!