且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

重新发布后新keyhash和密钥证书?

更新时间:2023-12-05 12:03:28


  

创建一个新的密钥库后,我才有所指向的新生成的密钥仓库生成谷歌地图和Facebook的新的密钥?


块引用>

案例1

如果您使用的是debug.keystore并签署从debug.keystore构建,那么你将看到hashkey如果您注册从其它系统相同的应用程序,因为debug.keystore是两个不同的机器会改变。但你不能上载谷歌应用程序播放使用debug.keystore所以你需要一个自己的密钥库存储签署后建立

案例2

所以,当你在这里创建了一个新的密钥库,那么你需要创建这个新hashkey。如果您复制此密钥库和粘贴到另一个系统,然后生成一个Facebook hashkey然后因为这两个系统的密钥库是由您创建的一样将保持不变。

这不要紧,你正在生成无论从code或在第二种情况下的keytool一个hashkey,因为使用的是相同的自己的密钥库将保持不变。

希望你现在明白了这一重大修改的一切。

I am planning to upload my first app on PlayStore and it uses Google Maps V2 and Facebook SDK. So far, I have used the tutorials on AndroidHive and mostly followed the steps blindly.

Google Maps and Faceboook both require me to generate a keyhash and a keycert. I generated my key cert as:

keytool -exportcert -alias androiddebugkey -keystore "%USERPROFILE%\.android\debug.keystore" | openssl sha1 -binary | openssl base64 > Desktop/SSL.txt  

Now, to release an app I will create a new keystore using Eclipse's EXPORT wizard.

After creating a new keystore, will I have to generate new keys for Google Maps and Facebook by pointing to the newly generated keystore?

Tutorial for Facebook SDK: http://www.androidhive.info/2012/03/android-facebook-connect-tutorial/
Tutorial for Google Map V2: http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/

After creating a new keystore, will I have to generate new keys for Google Maps and Facebook by pointing to the newly generated keystore?

Case 1

If you are using the debug.keystore and signing the build from debug.keystore then you will see that hashkey will change if you sign the same application from another system because debug.keystore is different for both machine. But You can't upload the app on Google Play Store after sign the build using debug.keystore so you need a own keystore.

Case 2

So When you here created a new keystore then you need to create a new hashkey for this. If you copy this keystore and paste to another system then generate a facebook hashkey then it will remain same because keystore of both system is same that is created by you.

It does not matter you are generating a hashkey from either code or keytool in second case it will remain same because you are using same your own keystore.

Hope you understand now everything from this major edit.