Reputation: 1144
I followed the instructions here Exactly.
this is my key.properties file:
this is my build.gradle file:
this is the error:
I even printed the file value and it is still wrong and not working. I tried the suggestions in the similar questions but they are not working for me.
Upvotes: 1
Views: 6400
Reputation: 3067
remove the <> from storeFile and you already pointing to the folder just need the file name should be something like this
storeFile = key.jks
Upvotes: 1
Reputation: 2685
First of all remove “<” and “>” then the path needs double backslashes as follows (the absolute path it's ok):
storeFile=C:\\Users\\YourUser\\OtherFolder\\ProjectPath\\somefilekey.jks
after that in your build.gradle file you have to use as follows:
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 30
//…...
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
//OR ……..
debug {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
//…….
}
Upvotes: 5