6
votes

I've been having this problem recently as I'm searching everywhere, also here in stack, I see a lot of different answers.
Does anybody know how to solve this one?

Error:(46, 0) Could not get unknown property 'RELEASE_STORE_PASSWORD' for SigningConfig_Decorated{name=debug, storeFile=C:\Users\— Shahab —\Desktop\master\TMessagesProj\config\release.keystore, storePassword=android, keyAlias=AndroidDebugKey, keyPassword=android, storeType=C:\Users\— Shahab —\Desktop\master\TMessagesProj\config\release.keystore, v1SigningEnabled=true, v2SigningEnabled=true} of type com.android.build.gradle.internal.dsl.SigningConfig. Open File

3

3 Answers

19
votes

Make sure that you have added the below line in your build.gradle file @ android/app.


def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

9
votes

Can you share your build gradle file? It seems that there is some problem in your Signing Configs.

Sharing a demo Signing Config code.

signingConfigs {
    release {
        storeFile file('demo.jks')
        storePassword "demo123"
        keyAlias "demo"
        keyPassword "demo123"
    }
}
0
votes

try adding this in your app/build.gradle at the top of android {...}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}