fth*_*dgn 24 android signed android-studio
我正在开发一个使用Google API的应用.我在"Google Developers Console"中创建了凭据.如果我创建了已签名的APK,并在手机上运行它,则没有问题.
问题是,当我开发应用程序时,当我单击RUN按钮时,它会在手机上部署应用程序的未签名版本.因此应用程序不起作用.
当单击RUN按钮时,如何设置Android Studio以使其在手机上部署签名的APK?
小智 44
将这些值添加到.gradle:
signingConfigs{
key{
keyAlias 'your key alias'
keyPassword 'your keypassword'
storeFile file('keystore path')
storePassword 'your storepassword'
}
}
buildTypes {
debug{
signingConfig signingConfigs.key
}
}
Run Code Online (Sandbox Code Playgroud)
文件中的密钥库路径类似于E:/xxx/xxx/xx.keystore.
Mix*_*xaz 16
通常我是从命令行执行,通过"adb install -r file.apk"安装(-r以保存应用程序的数据)
此外,它可以通过Gradle和项目设置完成,请参阅此处的答案:Android Studio - 在模拟器上运行签名的apk
| 归档时间: |
|
| 查看次数: |
15481 次 |
| 最近记录: |