Reputation: 201
When I run a js fetch in my react-native project using this google place url;
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=test&&key=API_KEY_HERE
The fetch works and I get autocomplete suggestions on a device connected via usb and started with
expo start --android
The problem is, when I build the app with
cd android && ./gradlew assembleRelease
I get an app where everything works, including Google Maps, all except the google places api. The built app shows me this goole places autocomplete api error when I try to debug;
The provided API key is invalid
This is quite strange as the very same API_KEY had already worked on an android device started with expo start --android
.
Also, I confirm that the built application is using the right API Key. Any help would be much appreciated.
Upvotes: 0
Views: 20