I\'m trying to get a marker with an custom icon in Google Maps Android API v2. I just changed one of the examples Google provides. I added .icon(BitmapDescriptorFactory.fr
See Custom marker in google maps in android with vector asset icon.
In my case I had markers over Google Maps. But on API 19 emulator there is a problem with Google Play Services
. So this error is misleading, Google Play Services
tried to create BitmapDescriptor
, but could not.
You should create markers in onMapReady()
, also move there any other code, working with Google Maps
.
If you have problems with showing Google Maps on Android 4, maybe you should downgrade a library from 16.1.0 to 16.0.0, see https://stackoverflow.com/a/54772374/2914140. But if you do so, you will get a crash on Androif 9, see Google Maps crashing on Android Pie.