【问题标题】:Gradle regression when looking for google-services.json?寻找 google-services.json 时的 Gradle 回归?
【发布时间】:2019-11-27 19:55:31
【问题描述】:

我更新到最后一个 Android Studio,这导致我也更新了 gradle。 虽然过去我不得不更改 google-services.json 文件的位置以适应 gradle 的变化,但现在看来 gradle 正在旧位置寻找这个文件

./MyProject/app/google-services.json

问题是这个位置不再有意义,因为我有多种不同的 google-services.json 文件。 现在,我把它们放在

./MyProject/app/src/MyFlavor/release/google-services.json
./MyProject/app/src/MyFlavor/debug/google-services.json

我该如何处理这种新的“回归”?

【问题讨论】:

    标签: android android-studio android-gradle-plugin


    【解决方案1】:

    好的, 我发现这是一个真正的回归,我需要向 Google 发布错误报告。

    我通过阅读这个答案解决了这个问题: https://stackoverflow.com/a/56823777/2231299

    所以基本上,它来自

    'com.google.gms:google-services:4.3.0'
    

    暂时的解决办法是回到

    'com.google.gms:google-services:4.2.0'
    

    【讨论】:

      猜你喜欢
      • 2018-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-05
      • 1970-01-01
      • 2016-10-04
      • 1970-01-01
      • 2021-06-11
      相关资源
      最近更新 更多