我想第一次上传 Android 应用程序,因此我正在阅读 Signing Your Applications指南,但有一件事不太清楚,因此,如果有人可以向我解释以下注释,我将不胜感激:
Note: Including the passwords for your release key and keystore inside the build file is not a good security practice. Alternatively, you can configure the build file to obtain these passwords from environment variables or have the build process prompt you for these passwords.
To obtain these passwords from environment variables:
storePassword System.getenv("KSTOREPWD")
keyPassword System.getenv("KEYPWD")
什么是环境变量?我到底需要对这些变量做什么?或者,如果我在 Android Studio 中签署我的应用程序,我不需要关心它们?
最佳答案
你真的不需要关心环境变量。当您从 Android Studio 构建项目时,系统应该提示您输入 keystore 位置和密码。只需选择正确的文件并输入正确的密码即可。
关于java - 如何配置构建文件以获取 Android 应用程序的发布 key 和 keystore 文件的密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32403942/