Complete the code to generate a release APK using Gradle.
./gradlew [1]Use assembleRelease to build the release APK for Android.
Complete the command to generate a signing key with keytool.
keytool -genkeypair -v -keystore [1] -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
The signing key is usually stored in a keystore file like my-release-key.keystore.
Fix the error in the Gradle signing config by completing the missing property.
signingConfigs {
release {
storeFile file("[1]")
storePassword "myStorePassword"
keyAlias "my-key-alias"
keyPassword "myKeyPassword"
}
}The storeFile must point to the correct keystore file used for signing.
Fill both blanks to configure the signing config in build.gradle.
android {
signingConfigs {
release {
storeFile file("[1]")
storePassword "[2]"
keyAlias "my-key-alias"
keyPassword "myKeyPassword"
}
}
}The storeFile should be the release keystore file, and storePassword is the password for that keystore.
Fill all three blanks to complete the release build type configuration.
android {
buildTypes {
release {
signingConfig signingConfigs.[1]
minifyEnabled [2]
proguardFiles getDefaultProguardFile('[3]'), 'proguard-rules.pro'
}
}
}The release build type uses the release signing config, enables code shrinking with true, and uses the default ProGuard file proguard-android-optimize.txt.