I'm using Android Studio 0.4.6 on two different machines. I'm using the maps v2 in my application, so I need the Certificate Fingerprint to be the same on both machines. Is there a way to accomplish this?
If you've published your app using Play App Signing, a requirement when using Android App Bundle, you can get your SHA-1 from the Google Play Console on the Release > Setup > App Integrity page.
SHA-1 also referred to as the Secure Hash Algorithm. It is a cryptographic hash function that will take input and it produces a 160-bit hash value.
There are two possible ways you can accomplish this :
1.By creating your own certificate
Create your own own certificate by following the steps mentioned here using the standrad java keytool
http://developer.android.com/tools/publishing/app-signing.html#cert
Now share your certificate between machines and configure it for builds in your build.gradle file like this
android {
signingConfigs {
debug {
storeFile file("debug.keystore")
}
myConfig {
storeFile file("other.keystore")
storePassword "certificate_password_here"
keyAlias "alias_key_here"
keyPassword "key_password_here"
}
}
buildTypes {
yourbuildtypename {
debuggable true
jniDebugBuild true
signingConfig signingConfigs.myConfig
}
}
}
This will create a new build type under Build Variant tab in left side panel select the one you want.
If you are on windows you can share your debug certificate among people from the location
C:\Users\your_user_name\.android\debug.keystore
Copy it somewhere in other machines and give the path inside debug signingConfigs as shown above. In this way you don't need to define an extra buildType
, your debug build automatically sign the application with the debug certificate located at path you have given.
2.Replacing the debug certificate in other machines :
Replace the debug certificate in other machines by what you have in your machine. Location is mentioned above in first method .
What you need to do is get the debug certificate used by the IDEs to sign your sample applications on both computers, usually the certificate is stored in:
~/.android/debug.keystore
All you might need to do is replace that debug key in one of your computers, and both apps will be signed with the same key(automatically by the IDE).
Regards!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With