I have multiple android dev workstations and I work on them to build Android apk and deploy them on one Android device. Whenever I change a workstation, I have to remove the app from the device and reinstall it with a new one. So all caches are removed after reinstall. I wonder whether there is a way for me to deal with multiple workstations sharing with one android device without reinstall. I think there must be something unique across multiple workstations.
Asked
Active
Viewed 40 times
1 Answers
0
This happens because different workstations have different debug keystore. You can achieve your intended behavior as follows:
- You can create your own keystore (follow this SO for creating it), check it in your repository. Place this keystore in your project directory.
- Change your debug config to use this new keystore. This will ensure your debug app is signed with same keystore across all your dev workstations
To do that change your build.gradle
as follows:
android {
...
signingConfigs {
defaultConfig {
storeFile file(getRootDir().getPath() + "\<file-name>.keystore")
storePassword <your password>
keyAlias <your alias>
keyPassword <your password>
}
}
buildTypes {
debug {
signingConfig signingConfigs.defaultConfig
...
}
}
}
- Commit the code and perform pull across all your dev workstations.

Sagar
- 23,903
- 4
- 62
- 62