React-native Expo构建:“非法选项:-jarfile”尝试为Google API密钥生成SHA1证书时出错android
问题描述:
我遵循Google身份验证集成的“构建独立应用程序”部分中提及的步骤,并且我停留在步骤产生 “SHA-1证书指纹” 按链接https://docs.expo.io/versions/latest/sdk/google.html#run-keytool--list--printcert--jarfile-growlerapk--grep-sha1--awk--print-2--where-growlerapk-is-the-name-of-the-apk-produced-in-step-1React-native Expo构建:“非法选项:-jarfile”尝试为Google API密钥生成SHA1证书时出错android
我得到一个错误:
Illegal option: -jarfile
当我运行命令:
keytool -list -printcert -jarfile growler.apk | grep SHA1 | awk '{ print $2 }'
我看到相同的命令也用于构建用于Facebook身份验证的独立Android应用程序。
链接GitHub的问题https://github.com/expo/exp/issues/71
答
你最有可能需要更新您的keytool
二进制文件。见 https://forums.expo.io/t/generate-androidstandaloneappclientid-help/3422/7