[英]Android : what metadata tags are needed for google signin
I am trying to add google signin capability to my app.我正在尝试将 google 登录功能添加到我的应用程序中。 I keep getting this runtime error:
我不断收到此运行时错误:
Please verify that your manifest refers to the correct project ID.
For more information, refer to the troubleshooting guide:
https://developers.google.com/games/services/android/troubleshooting#check_your_metadata_tags
I have registered my app here at Google developers , added SHA1 key and received Client Id and secret key.我已经在Google 开发者那里注册了我的应用程序,添加了 SHA1 密钥并收到了客户端 ID 和密钥。
ClientID: 99######-f96#############.apps.googleusercontent.com客户端 ID:99######-f96#############.apps.googleusercontent.com
Here are the current metadata tags I have:以下是我拥有的当前元数据标签:
<meta-data android:name="com.google.android.gms.version"
android:value="@string/app_id"/>
I have set app_id in strings.xml to the ClientID我已将 strings.xml 中的 app_id 设置为 ClientID
**Question 1: Why do I keep getting asked to register the app as a game (as indicated by the link in the error)? **问题 1:为什么我一直被要求将应用程序注册为游戏(如错误中的链接所示)?
Question 2: Am I setting the app_id to the right value (ie ClientID)?**问题 2:我是否将 app_id 设置为正确的值(即 ClientID)?**
Thank you谢谢
Resolved the issue by changing android:value in the metadata.通过更改元数据中的 android:value 解决了该问题。
Initially I had <meta data android:name="com.google.android.gms.version android:value="@string/app_id" />
最初我有
<meta data android:name="com.google.android.gms.version android:value="@string/app_id" />
app_id set to clientId app_id 设置为 clientId
Replaced it with: <meta data android:name="com.google.android.gms.version android:value="@integer/google_lay_services_version" />
将其替换为:
<meta data android:name="com.google.android.gms.version android:value="@integer/google_lay_services_version" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.