android - { "error_message": "You must enable Billing on the Google Cloud Project }

标签 android google-maps android-studio google-cloud-platform google-directions-api

试图获取 map 中两点之间的方向路线

这是我用来获取路线的网址

(https://maps.googleapis.com/maps/api/directions/json?origin=16.3064857,80.4418659&destination=27.2038,77.5011&mode=driving&key=MyApiKey)


我已经在谷歌云控制台中启用了我的计费帐户,但仍然得到输出

{

  "error_message": "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started",

  "routes": [],

  "status": "REQUEST_DENIED"


}

最佳答案

您首先需要验证该项目是否已链接到相关的结算帐户。您可以通过进入“Google Cloud Console 管理结算帐户页面”,选择您的结算帐户并点击“与此结算帐户关联的项目”进行检查。 [1] 然后,您需要通过进入“我的项目”选项卡来验证计费帐户是否与相关项目相关联,然后您将看到所有项目及其关联的计费帐户。 [2] 任何没有与之关联的计费帐户的项目将显示“计费已禁用”作为消息。要启用计费,请转到“我的项目”选项卡并从列表中单击所需项目的菜单,选择“更改计费”,然后选择所需的目标计费帐户。如果您已验证上述步骤,请检查该帐户是否拥有所需的权限 [3]

[1] https://cloud.google.com/billing/docs/how-to/view-linked#view_the_projects_linked_to_a_billing_account

[2] https://cloud.google.com/billing/docs/how-to/view-linked#view_the_billing_account_linked_to_each_of_your_projects

[3] https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_an_existing_project

关于android - { "error_message": "You must enable Billing on the Google Cloud Project },我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59341820/

相关文章:

android - 透明 AppBarLayout 和 CollapsingToolbarLayout

android - 在没有外部存储的情况下,如何使用 NFC 传输文件?

javascript - 谷歌地图建议。根据第一个输入过滤建议

google-maps - 动态加载Google Maps api

android - 从第三方 lib/sdk 中删除所有调试日志记录调用(Proguard 不工作)

android - Android Studio中导入的模块找不到导入的类

android - 在 Play 商店中发布 apk 后,Google map 显示灰色方 block

javascript - 使用 jQuery 和 Cordova 使用 sqlite 自动完成

jquery - 使用 Google map api 时出现 "gmap is not a function"

android - 联想A600在应用程序被杀死后无法保持服务运行