设置Google Map API时Google Api身份验证失败

时间:2019-10-31 11:15:54

标签: android google-maps google-api

我在我的应用程序中使用google map API时工作正常,但是昨天当我在应用程序中添加了其他功能并开始对其进行测试时,Map API不再起作用,因此我认为代码可能存在问题,所以我检查并发现我没有更改地图API中的任何内容,但是当我尝试在Google API中创建另一个应用程序时,知道超过了限制,甚至无法查看我当前拥有的项目,因为限制为30就像它说的那样,但实际上,我使用的API大多是4-6个应用。我调查了其他类似的问题,并尝试了同样的事情,但到目前为止没有解决方案。任何可能对我有帮助的解决方案都会有所帮助 我在运行时遇到此错误

Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:

关键就在那儿,正如我所说的,那是同一个应用程序,可以运行得更早。

2 个答案:

答案 0 :(得分:0)

以下步骤可能会有所帮助:- 1.登录到Google devloper控制台。 2.选择您的项目 3.选择“库”。 4.检查Maps API是否已启用。

答案 1 :(得分:0)

1 => https://console.developers.google.com/apis/credentials
2 => create credentials
3 => Api key 
4 => Restrick Key
5 => Application restrictions -> Android apps and API restrictions -> Don't restrict key
6 => Save then wait for 5 min then use generated api key