签约Mac上的Android应用为Facebook应用 [英] Signing Android app on Mac for Facebook App
问题描述
我曾经签署了keytool PC我的应用程序,并获得哈希code是在FB应用程序使用。
I used to sign my apps on PC with keytool, and get the hashcode that is used in FB app.
现在,我已经切换到Mac,我必须再次登录我的应用程序。
Now, I've switched to Mac, and I have to sign my app again.
我遵循的程序适用于Mac 找不到密钥工具在Mac 一>
I've followed the procedure explained for mac cannot find keytool on a mac
我已经成功地生成签署.apk文件,但我不明白的地方找到我的应用程序在Mac上Android的密钥散列?
I've managed to generate signed .APK, but I do not understand where to find Android Key Hash of my app on Mac?
任何人都可以点我朝着正确的方向吧。
Can anyone point me to right direction please.
推荐答案
我不是一个Mac用户因此将无法专门给你解决了一台Mac,但我可以给你的东西更好,更简单。
I am not a Mac user so won't be able to give you a solution specifically for a Mac, but I can give you something better and simpler.
我在这里贴出了类似的答案: http://stackoverflow.com/a/13283088/450534 。第二溶液的工作而不管到该平台。
I have posted a similar answer here: http://stackoverflow.com/a/13283088/450534. The second solution works regardless to the platform.
试试这个。这是从上面链接的答案完全相同的。
Give this a try. This is the exact same from the answer linked above.
我总是发现这样做最简单的事情是,让Facebook的SDK告诉你,你的散列键是的。这是迄今为止更简单,不会超过一两分钟以上。
I always found the simplest thing to do was, let the Facebook SDK tell you what your Hash Key is. This is by far more simpler and shouldn't take more than a couple of minutes.
的第1步:的
在你的Facebook SDK,找到的 Util.java 的类。在那,更改此:
Step 1: In your Facebook SDK, locate the Util.java class. In that, change this:
private static boolean ENABLE_LOG = false;
到
private static boolean ENABLE_LOG = true;
的第二步:的
创建一个新签名APK,转移到您的设备和安装。如果已经安装,当然,它会提示。
Step 2: Create a new Signed APK, transfer to your device and install. If it is already installed, naturally, it will prompt.
的第3步:的
有了您的DDMS(logcat的)运行和设备连接到计算机,运行应用程序,并继续寻找一个的键不匹配的警告。这一警告已经在实际散列键。复制钥匙,去你的Facebook开发页面,添加新的密钥列表中。
Step 3: With your DDMS (Logcat) running and your device connected to the computer, run the application and keep looking for a key mismatch warning. That warning has the actual Hash Key. Copy that key, go to your Facebook Developer page and add the new key to the list.
您可能还需要经历从这个答案我的意见。 http://stackoverflow.com/a/10516629/450534 。在第三个评论,在OP已张贴在回应的logcat
。
You might also want to go through the comments from this answer of mine. http://stackoverflow.com/a/10516629/450534. In the third comment, the OP has posted the response in Logcat
.
编辑:Facebook官方入门 - 步骤4 页生成的Mac上的一个键哈希提供此命令:
The official Facebook Getting Started - Step 4 pages provides this command for generating a Key Hash on a Mac:
密钥工具-exportcert -alias androiddebugkey -keystore
〜/ .android / debug.keystore | OpenSSL的SHA1 -binary | OpenSSL的BASE64
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
这篇关于签约Mac上的Android应用为Facebook应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!