Android Studio - Google map still blank on real Android device -
googled it, read millions of advices how generate google api key, how use nothing works!
- enabled google maps v2 api
- created project 1 activity google map (default wizard in studio)
- created key on google debug project, assigned sha1;app package of application project key on google
- api key inserted google_maps_api.xml (androidmanifest.xml updated automaticaly)
- build & run on avd on app working, map shown.
then:
- api enabled
- in android studio created keystore release (keystore.rel.jks)
- generated fingerprints (keytool -list -v -keystore c:\dropbox\androidkeystore\keystore.rel.jks)
- on google added new fingerprint new release project (release sha1;app package) - key generated aiza...
- api key inserted google_maps_api.xml (androidmanifest.xml updated automatically)
- generate signed app (using keystore.rel.jks) & install on real device ... app working, map still blank, zoom buttons , google label on
thanks in advance advice.
zdenek
make sure enter release api key in google_maps_api.xml under release folder.
first, switch project view using dropdown in upper left of project explorer. then, expand app/src/
, , see subfolders debug
, release
. under there, should see 2 separate google_maps_api.xml files under debug/res/values
, release/res/values
.
make sure release api key in google_maps_api.xml file under release/res/values
folder, since 1 used signed release apk.
Comments
Post a Comment