When I click the Run button in Android Studio, it installs and runs the app on the device.
If I carry the device to a different machine, where I check out the same app and click run, it will tell me that this build is signed with a different key, so the app first has to be uninstalled, which takes time and deletes the app’s data.
I would like to use the same key on both machines, so that I can switch between them.
Where do I find that key, or even better, is its location configurable?
2
Answers
For development build you could just build the .apk file without any key. But if you are referring to signing key need by Google Play to upload the apps, you could create it in Android Studio.
Please make sure, you select .apk file for development build(not bundle) if you intend to just test it on your device.
The debug.keystore file is located in the following paths:
~/.android/debug.keystore
C:Users%username%.androiddebug.keystore
If you want to change debug.keystore to your keystore, then add the following code to your app level build.gradle:
If you need to sign a release build, then add the following code: