【问题标题】:Where to put credentials.json in Android Studio在 Android Studio 中放置 credentials.json 的位置
【发布时间】:2023-03-03 01:05:01
【问题描述】:

我做了一个涉及 Google 登录的项目。

下载的文件是 credentials.json。

我把这个放在哪里?

从 google-services.json 更改后

注意:我没有使用 Firebase。

【问题讨论】:

    标签: android google-signin


    【解决方案1】:

    最常见的位置是在您的project_folder/app 文件夹中。

    【讨论】:

    • 没用.. google-services.json 和 credentials.json 的架构也不同。
    • 这也没有解决我的问题。应用程序仍然显示“找不到资源”。有什么帮助吗?
    【解决方案2】:

    您不需要 credentials.json 文件即可将基本的 google 登录添加到您的应用中

    按照这个 url 并单击 Configure a project 按钮添加包名称和密钥 sha-1 指纹,你应该很高兴

    https://developers.google.com/identity/sign-in/android/start-integrating

    查看这个 google 示例项目以获得完整的实现

    https://github.com/googlesamples/google-services/tree/master/android/signin

    【讨论】:

    • credentials.json 用于 Web 应用程序
    猜你喜欢
    • 1970-01-01
    • 2019-02-02
    • 1970-01-01
    • 2015-06-05
    • 2018-04-12
    • 2022-06-21
    • 1970-01-01
    • 2014-12-31
    • 1970-01-01
    相关资源
    最近更新 更多