简体   繁体   English

将 P12 转换为 JKS 证书 Adode AIR 到原生 Android 问题

[英]Converting P12 to JKS Certificate Adode AIR to Native Android Issues

I have an app in the play store which I built in Adbobe AIR and I'm now looking to upgrade it with a version built in native Android via Android Studio.我在 Play 商店中有一个应用程序,它是我在 Adbobe AIR 中构建的,我现在希望通过 Android Studio 使用原生 Android 中构建的版本来升级它。

When it comes to certificate signing I have some issues... When originally exporting the APK from flashbuilder I generated a self signed certificate as a .p12 file and it asked for a password for this when you first generate the certificate and then use it each time.当涉及到证书签名时,我遇到了一些问题......最初从 flashbuilder 导出 APK 时,我生成了一个自签名证书作为 .p12 文件,当您第一次生成证书然后每次使用它时,它要求为此输入密码时间。 That worked fine...那工作得很好...

Now when creating the new native java app Android Studio obviously requires .jks to sign with.现在,当创建新的原生 Java 应用程序时,Android Studio 显然需要使用 .jks 进行签名。

I have apparently successfully converted the old .p12 to jks using the keytool in java using the technique highlighted here in one of the comments: http://www.webfarmr.eu/2010/04/import-pkcs12-private-keys-into-jks-keystores-using-java-keytool/我显然已经使用 Java 中的 keytool 成功地将旧的 .p12 转换为 jks,使用其中一条评论中突出显示的技术: http : //www.webfarmr.eu/2010/04/import-pkcs12-private-keys-into -jks-keystores-using-java-keytool/

When I attempt to Generate Signed APK for the app from Android Studio it prompts for:当我尝试从 Android Studio 为应用程序生成签名的 APK 时,它会提示:

  • "Key store path" - Ive got that “密钥存储路径” - 我知道了
  • "Key store password" - got that. “密钥库密码” - 明白了。
  • "Key alias" - How do I find this out?? “密钥别名” - 我如何找到它?
  • "Key password" - Where was this set originally?? “密钥密码” - 这个最初是在哪里设置的??

So basically I'm stuck not knowing what the key alias and key password is because these things are never asked for when the .p12 was created in FlashBuilder originally.所以基本上我不知道密钥别名和密钥密码是什么,因为最初在 FlashBuilder 中创建 .p12 时从不要求这些东西。

Any help around how to accomplish this conversion would be appreciated.任何有关如何完成此转换的帮助将不胜感激。

Thanks Marco谢谢马可

Ok I worked this out for anyone wondering what the deal with converting p12 to jks. 好的,我想出任何人想知道将p12转换为jks的处理方式。 When I converted my old p12 certificate I used the inbfo on this page: http://www.webfarmr.eu/2010/04/import-pkcs12-private-keys-into-jks-keystores-using-java-keytool/ 当我转换旧的p12证书时,在此页面上使用了inbfo: http : //www.webfarmr.eu/2010/04/import-pkcs12-private-keys-into-jks-keystores-using-java-keytool/

I used the following command(with my own file names): keytool -importkeystore -srckeystore alice.p12 -srcstoretype PKCS12 -destkeystore alice.jks . 我使用以下命令(具有自己的文件名):keytool -importkeystore -srckeystore alice.p12 -srcstoretype PKCS12 -destkeystore alice.jks。

This creates a default alias in the new keystore called "1" and the password for that actual key is the same password that was originally used in flashbuilder to create the old p12 certificate. 这将在名为“ 1”的新密钥库中创建一个默认别名,该实际密钥的密码与最初在flashbuilder中用于创建旧p12证书的密码相同。

this is the problem when I upload my aab file这是我上传 aab 文件时的问题

Your Android App Bundle is signed with the wrong key.您的 Android App Bundle 使用错误的密钥签名。 Ensure that your App Bundle is signed with the correct signing key and try again.确保您的 App Bundle 使用正确的签名密钥进行签名,然后重试。 Your App Bundle is expected to be signed with the certificate with fingerprint:\\您的 App Bundle 应使用带指纹的证书进行签名:\\

need help需要帮忙

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

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