How to generate the SHA from Android Studio
Create a file in android folder of your project name
key.properties
if not exists.Add properties and it's value below
storePassword=<Your JKS password>
keyPassword=<Your JKS Key Password>
keyAlias=<You JKS Key Alias>
storeFile=<Your jks file location path>Add following line to your Android/app/build.gradle file above the all
android
block (Check if this line already exist or not)def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists())
{
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}Now in app:build.gradle android block check for below lines if not exist Add into your Android/app/build.gradle
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}Open your terminal and enter following command
cd android
./gradlew signinReport
Wait for a while it will generate your SHA Copy Both SHA1 and SHA256 for variant & config
Debug
andRelease
and add to Firebase