简体   繁体   English

密钥库和私钥迁移

[英]keystore and private key migration

I have and issue when I try to generate signed-apk. 我尝试生成带签名的apk时遇到问题。 Well, I have a laptop what was used to development my android app using android studio by other hand I have a desktop with clean android installation. 好吧,我有一台笔记本电脑,而另一方面,我有一台使用Android Studio开发我的android应用程序的台式机,它的桌面安装了干净的android系统。

I copied /home/.android folder from m laptop to my desktop but when I try to compile a signed-apk I get follow error message: cannot recover key. 我将/home/.android文件夹从m笔记本电脑复制到了我的桌面,但是当我尝试编译一个带签名的apk时,出现以下错误信息:无法恢复密钥。 Either if I compile it on my laptop I am able to get signed apk. 如果我在笔记本电脑上编译它,我都可以获取签名的APK。

Do I am missing something? 我想念什么吗? Thanks a lot 非常感谢

Make sure you added these in your build.gradle: 确保已将这些添加到build.gradle中:

signingConfigs{
        config {
            keyAlias '****'
            keyPassword '****'
            storeFile file('****.keystore')
            storePassword '****'
        }
    }

On your laptop you might be using existing keystore path that is the .jks file , use the same file to generate signed apk on your desktop. 在笔记本电脑上,您可能正在使用现有的密钥库路径(即.jks文件),并使用同一文件在桌面上生成签名的apk。 See if this works. 看看是否可行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM