android studio, how to make signed apk for release build (gradle using KTS build files)

120 Views Asked by At

Would like to run the release build (it is app with multiple lib modules), but it is asking for sign it.

was working by adding the code in the gradle file as:

android {
    signingConfigs {
        config {
            keyAlias 'key0'
            keyPassword 'test'
            storeFile file('/root/user/androidPrjsKeyStores')
            storePassword 'test'
        }
    }
    compileSdkVersion build_versions.target_sdk
    buildToolsVersion build_versions.build_tools
    defaultConfig {

but after the change the gradle to KTS build files, this code does not work.

so went through the way with android studio

enter image description here

enter image description here

enter image description here

enter image description here

and got t:

enter image description here

but clicking on the "locate" to the release.apk and drag to emulator it got this error

enter image description here

and

cannt open the project for fixing:

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

lol, it should work but need to delete the one installed before.