I would like to have my Gradle build to create a release signed apk file using Gradle.
I'm not sure if the code is correct or if I'm missing a parameter when doing gradle build
?
This is some of the code in my gradle file:
android {
...
signingConfigs {
release {
storeFile file("release.keystore")
storePassword "******"
keyAlias "******"
keyPassword "******"
}
}
}
The gradle build finishes SUCCESSFUL, and in my build/apk
folder I only see the ...-release-unsigned.apk
and ...-debug-unaligned.apk
files.
Any suggestions on how to solve this?
Like @Destil said but allow others who don't have the key to build: Easier way than previous answers:
Put this into
~/.gradle/gradle.properties
Modify your
build.gradle
like this:Then you can run
gradle assembleRelease
ORgradle build
Android Studio Go to File -> Project Structure or press Ctrl+Alt+Shift+S
See The Image
Click Ok
Then the signingConfigs will generate on your build.gradle file.