Android 应用程序错误 - 您必须在 Google Cloud 项目上启用计费

标签 android google-maps google-cloud-platform google-places-api google-cloud-billing

我有一个 Android 应用程序,可以使用 Google map 显示附近的医院。我正在使用 Maps & Places API。

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=12.2649519,76.6208733&radius=10000&type=hospital&sensor=true&key=MY_API_KEY

我已为我的帐户启用计费。我已将该帐户链接到我的项目。该应用程序运行良好。但是当我现在检查它时,它给了我错误

{ "error_message": "您必须在 https://console.cloud.google.com/project/_/billing/enable 上启用 Google Cloud 项目的计费 在 https://developers 上了解更多信息。 google.com/maps/gmp-get-started", "html_attributions": [], "results": [], "status": "REQUEST_DENIED"

我的结算帐户处于 Activity 状态。我没有对代码或我的计费帐户进行任何更改。我没有对我的 API key 设置任何应用程序或 API 限制。

我创建了一个新的结算帐户并将其链接到项目以检查我的旧结算帐户是否有任何问题。我遇到了同样的错误。

最佳答案

根据 @Sahana Kamath 的评论,此问题已由 Google map 支持团队解决

As I’ve checked here your billing account is in INR which the Maps project is linked with. Maps projects will only work in a USD billing account, so what you need to do is create a new billing account in USD currency. Just make sure that you select your country for the Country and also select google maps platform to make sure you create it right.

此外,根据文档 About currencies and Cloud Billing accounts :

Each Cloud Billing account operates in a single currency, which you cannot change after you create your Cloud Billing account. If you need a Cloud Billing account to operate in a currency different than the currency of your existing Cloud Billing account, you will need to set up a new Cloud Billing account.

此外,请查看文档 Getting started with Google Maps PlatformGoogle Maps Platform Billing .

关于Android 应用程序错误 - 您必须在 Google Cloud 项目上启用计费,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62997288/

相关文章:

android - 如何更改生成的apk文件的默认输出文件夹?

android - 如何以编程方式滚动 tablayout - Android

在 ListView 中使用 ratingbar 的 android 必需示例

ios - 获取多个坐标之间的方向

firebase - 为什么 "retry on failure"在 Google Cloud Functions 控制台中显示为灰色?

Android:如何设置通知的辅助图标?

android - 如何在 Google map 上绘制静态目标圆圈?

java - Android 3.1及以上版本自动开启定位服务

javascript - 如何使用API​​从Google云平台读取文本文件

docker - 谷歌云上基于 Windows 的容器运行