由于丢失应用的签名 key 非常可怕,因此显然建议确保其安全并对其进行备份。
docs在这方面有点困惑(至少对我而言),指的是“应用程序签名 key ”和“ keystore ”,就好像它们是分开的东西一样,需要单独管理和备份。 “应用程序签名 key ”部分或定义在“ keystore ”中,与它没有区别吗?
无论如何,只是为了确保我备份了我需要的所有东西,这样如果我的硬盘驱动器被损坏,或者甚至当我刚刚设置一个新工作站并想要重新创建我的 IDE 时,是公平地说(就应用程序签名 key 而言)我需要备份的唯一是单个 .jks
storeFile
部分中引用的文件我的 build.gradle
在这里:
signingConfigs {
development {
keyAlias 'MyKeyAlias'
keyPassword 'mykeypassword'
storeFile file('C:/Users/MyName/my-android-keystores/my-android-keystore.jks')
storePassword 'mystorepassword'
}
}
defaultConfig {
signingConfig signingConfigs.development
}
最佳答案
Isn't the "app signing key" part of or defined in the "keystore", not different from it?
是的,签名 key 在 keystore 中。
the only thing I need to back up is the single .jks file which is referred to in the storeFile part my build.gradle here
您还需要 build.gradle
文件本身或其他有您密码的东西(例如,密码保险箱)。
关于 keystore 的 Android Studio 备份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46866927/