Android) 微信开发者的应用签名。我赋予它什么价值?

Android) Application Signature of weChat developers. What value do I put in it?

我想获取微信登录数据。 由于应用程序签名的问题,我曾经失败过一次。 请告诉我如何给 'Application Signature' 赋值。 谢谢

Check out this example code I found on github.

For the signature, use the MD5 hash of the key used to sign your published APK. The easiest way to do this is to setup a signature to always use for your debug/release builds. If you have a java keystore holding a signing key within your project, you can add the following to your app gradle file to sign your debug release with a constant signature:

 android {
     ...
     // Keystore located in root project folder. Google can show many examples on how to generate keystores with signatures

     signingConfigs {
         debug {
             storeFile file('keystore.jks')
             storePassword 'password'
             keyAlias 'weChatDebug'
             keyPassword 'password'
         }
     }
     ... }

您必须输入密钥库的 MD5。 Keystore 将是您签署 APK 的那个。

更简单的方法是:

  1. 按照此 link 下载此应用程序。
  2. 安装您要生成签名的应用(应用必须签名)
  3. 打开第一步下载的应用,填写第二步安装的应用包名,点击按钮
  4. 将为您生成一个签名