Google Place Api: Requests from this Android client application com.package.name are blocked

我的梦境 提交于 2019-12-02 21:55:00

问题


I am using PlaceAutocompleteFragment and when i click on search field PlaceAutocompleteFragment dialog disappear then i get this error :

{"errors":[{"domain":"global","reason":"forbidden","message":"Requests from this Android client application com.ganger.package are blocked."}],"code":403}

by the way, when I install the application through the Android Studio this works perfectly so... what I have done for solve this

1.generated new API but it didn't work.

2.google place API is enabled.

4.meta data is in application tag in the manifest file.

5.Android Place Autocomplete Fragment closing on its own

6.Place Autocomplete not working properly Android 7.PlaceAutocompleteFragment disappears on click. After doing all these things still facing the same problem. Thanks in advance and really sorry for bad English...


回答1:


It seems like you are getting the error due to wrong SHA1 fingerptint because you have to add SHA1 based on your app's digital certificate.

In Your question you mentioned that the app is working fine when you run the app in debug-configuration(directly from the Android Studio). So i think it's working fine because you have entered the SHA1 for your debug-certificate. So you have to add the SHA1 for your release configuration as well to work with the API while you run the app in release-configuration(Signed apk with key-store).

You can get more idea about A debug certificate and A release certificate from here



来源:https://stackoverflow.com/questions/50712425/google-place-api-requests-from-this-android-client-application-com-package-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!