在 android studio 中构建应用程序后未生成值文件
因此,我正在关注有关如何使用谷歌身份验证登录的 Firebase 文档,我一直在遵循每个步骤并添加了每个依赖项,但我在这段代码中遇到了错误:
// Configure Google Sign In
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(getString(R.string.default_web_client_id))
.requestEmail()
.build();
mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
我在“default_web_client_id”中收到错误在我构建我的应用程序后,它应该在values.xml文件中生成,但是当我这样做时没有任何反应,我不知道如何解决这个问题,因为我是android studio的新手,任何帮助将不胜感激,谢谢!
So I'm following the Firebase documentation on how to sign in using google authentication, I have been following every step and I added every dependency, but I encounteted an error in this piece of code:
// Configure Google Sign In
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(getString(R.string.default_web_client_id))
.requestEmail()
.build();
mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
I'm getting an error in "default_web_client_id" where it should be generated in a values.xml file after I build my app, but nothing happens when I do that, I have no idea how to solve this as I'm new to android studio, any help will be appreciated Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不知道这是否对每个人都有效,但我将我的项目提交到github,删除它然后再次克隆它,这似乎有效(也许gradle同步第一次没有正常工作),希望这对大家有帮助有同样的问题!
Don't know if this will work for everyone but I commited my project to github, deleted it and then cloned it again, and that seems to work (maybe the gradle sync didn't work properly the first time), hope this helps everyone with the same issue!