背景
社内開発の場合、デバッグ用端末をチームで使いまわしてデバッグ等行う事が多い。その際、他人のインストールしたデバッグアプリをアップデートインストールしようとすると、署名が違うと怒られる。いちいちクリーンしてからインストール。これが結構面倒だったので対応した。要は署名を共通化すればいい。
build.gradle 設定
android {
...略...
signingConfigs {
debug {
storeFile file("debug.keystore")
}
}
}
debug.keystoreはapp直下においてgit管理させれば良い。
余談
デフォルトのdebug.keystoreは以下に格納されており、PCごとに違う。
個人でやってた頃は、こちらのファイルをコピペすることによって、共通化させていた。
- Win :
C:\Users\<username>\.android\
- Mac :
~/.android/