简体   繁体   English

Android如何使用谷歌提供的许可证密钥签署我的APK

[英]Android how to sign my APK with google provided license key

I have to sign my APK and Google market provide me a key which is something like 我必须签署我的APK和谷歌市场为我提供一个类似的钥匙

YOUR LICENSE KEY FOR THIS APPLICATION Base64-encoded RSA public key to include in your binary. 此应用程序的许可证密钥Base64编码的RSA公钥包含在您的二进制文件中。 Please remove any spaces. 请删除任何空格。 MIIBIjANBgasdfasdfdaskqhkiG9w0BAQEadfadfasdFAAOCAQ8AMIIBCgKCAQEAuacIf........ MIIBIjANBgasdfasdfdaskqhkiG9w0BAQEadfadfasdFAAOCAQ8AMIIBCgKCAQEAuacIf ........

How can I sign my APK with this key and how include this key in my binary? 如何使用此密钥签署我的APK以及如何在我的二进制文件中包含此密钥?

I had the same question. 我有同样的问题。 Finally found that the RSA public key on Dev-Console is for "licensing". 最后发现Dev-Console上的RSA公钥用于“许可”。 It means that the app can use the key to query if the user has a current and valid license for using your app or the services in it. 这意味着应用程序可以使用密钥来查询用户是否拥有使用您的应用程序或其中的服务的当前有效许可证。 This is totally different from signing an apk. 这与签署apk完全不同。

http://developer.android.com/google/play/licensing/index.html http://developer.android.com/google/play/licensing/index.html

I too am like the original poster asked wondering what to do with the lisence key generated by the developer console on my way to publishing in the Google Play store. 我也不喜欢原来的海报,想知道如何处理开发者控制台在我在Google Play商店发布的途中生成的lisence密钥。

While all the above posts show how to export and create keystore etc in Eclipse or from a command line, none of them answer what the dadgum key Google offers up is for. 虽然以上所有帖子都展示了如何在Eclipse中或从命令行导出和创建密钥库等,但它们都没有回答Google提供的关键词。 Do I need to add it somehow? 我需要以某种方式添加它吗? I see no way to specify the key Google generated as a "licening key" in the Google Play Developer Console, and NOTHING tells me HOW to bind THAT key to my app. 我认为无法指定Google在Google Play开发者控制台中生成的“许可密钥”密钥,而NOTHING告诉我如何将该密钥绑定到我的应用程序。

I already know how to export a signed app using eclipse but that does not have the Google Play key. 我已经知道如何使用eclipse导出已签名的应用程序但没有Google Play密钥。 If someone can point me in the right direction it is much appreciated. 如果有人能指出我正确的方向,我们非常感激。

OK I have figured it out. 好的,我已经弄清楚了。 The licence key is irrelevant to signing your app and is for licensing purposes within your app. 许可证密钥与您的应用程序签名无关,并且在您的应用程序中用于许可。

The Android Developer site has a great walkthrough for signing apps here . Android开发者网站在这里有一个很好的签名应用程序演练。

Seeing as though you have your key, you just need to create a password-protected keystore file " .keystore " by using the keytool shown here . 看上去好像有了密钥,你只需要使用这里显示的keytool创建一个受密码保护的密钥库文件“ .keystore ”。 This will prompt you to enter all the details that Android requires for a signed app. 这将提示您输入Android对已签名应用程序所需的所有详细信息。

You can check other answers here and here . 你可以在这里这里查看其他答案。

Eclipse makes it really easy to export by right clicking on your project and selecting "Android Tools > Export Signed Application Package". 通过右键单击项目并选择“Android工具>导出签名的应用程序包”,Eclipse可以非常轻松地导出。

Good luck! 祝好运!

这里是Nice tutotial 如何创建keysote文件

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

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