【问题标题】:Not able to get SHA-1 key for flutter app无法获取颤振应用程序的 SHA-1 密钥
【发布时间】:2020-08-28 14:00:29
【问题描述】:

我正在开发一个 Flutter 应用并想使用 google 登录,为此,我需要我的应用 SHA-1 密钥。

如何获取密钥说明here

但是当我运行命令./gradlew signingReport

我收到错误:-

    Starting a Gradle Daemon, 2 stopped Daemons could not be reused, use --status for details

    FAILURE: Build failed with an exception.

    * What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/5.6.2/userguide/gradle_daemon.html
    Process command line: C:\Program Files (x86)\Java\jre1.8.0_241\bin\java.exe -Xmx1536M -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp E:\Users\rasku\.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb\gradle-5.6.2\lib\gradle-launcher-5.6.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.6.2
    Please read the following process output to find out more:
    -----------------------
    Error occurred during initialization of VM
    Could not reserve enough space for 1572864KB object heap


    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

我是应用签名和谷歌登录的新手。有什么问题以及如何获取应用程序的 SHA-1 密钥?

【问题讨论】:

标签: android flutter key sha1


【解决方案1】:

获取调试证书指纹:

对于 Linux/mac 打开终端并运行

keytool -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore

适用于窗户

keytool -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore

参考link

【讨论】:

    【解决方案2】:

    执行以下步骤:

    1. 确保您从link 安装了 Java jdk

    2. 将此路径添加到您的环境路径 C:\Program Files\Java\jdk1.8.0_202\bin

    3. 重启安卓工作室

    4. 在终端中运行此命令

      keytool -list -v -keystore "C:\Users{你的用户名}.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-21
      • 2020-05-02
      • 1970-01-01
      • 1970-01-01
      • 2020-10-03
      • 2017-09-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多