React Native Google Places API限制问题

时间:2017-07-11 08:12:25

标签: react-native google-places-api android-restrictions

使用React Native Google Places autocomplete时出现以下错误。

  

此IP,网站或移动应用程序无权使用此API   键...

我正在使用Google Places API Web服务密钥,这对Android-App有所限制。 这个名称受到包名com.xxx.xxx.debugcom.xxx.xxx.test的限制。另一个API密钥仅限于com.xxx.xxx。 我已添加了正确的SHA-1密钥。

任何人都知道我做错了什么或为什么它不起作用? 我检查了Google的文档并尝试了很多不同的东西,但我还是无法使用限制。

1 个答案:

答案 0 :(得分:0)

将您的React-Native Android程序包ID添加到您用于Google Places API的密钥中。您可以在项目(根文件夹) =>中找到它。 android => app => build.gradle => 申请ID