This is the error I get:
java.lang.RuntimeException: java.lang.SecurityException: my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION
at anywheresoftware.b4a.objects.MapFragmentWrapper$1.onMapReady(MapFragmentWrapper.java:197)
at com.google.android.gms.maps.zzab.zza(Unknown Source)
at com.google.android.gms.maps.internal.zzaq.dispatchTransaction(Unknown Source)
at com.google.android.gms.internal.maps.zzb.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at fb.b
com.google.android.gms.dynamite_mapsdynamite@12874022@12.8.74 (040308-204998136):20)
at com.google.android.gms.maps.internal.bg.a
com.google.android.gms.dynamite_mapsdynamite@12874022@12.8.74 (040308-204998136):5)
at com.google.maps.api.android.lib6.impl.be.run
com.google.android.gms.dynamite_mapsdynamite@12874022@12.8.74 (040308-204998136):5)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.SecurityException: my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION
at com.google.maps.api.android.lib6.impl.bc.c
com.google.android.gms.dynamite_mapsdynamite@12874022@12.8.74 (040308-204998136):692)
at com.google.android.gms.maps.internal.l.a
com.google.android.gms.dynamite_mapsdynamite@12874022@12.8.74 (040308-204998136):138)
at fc.onTransact
com.google.android.gms.dynamite_mapsdynamite@12874022@12.8.74 (040308-204998136):12)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.internal.maps.zza.transactAndReadExceptionReturnVoid(Unknown Source)
at com.google.android.gms.maps.internal.zzg.setMyLocationEnabled(Unknown Source)
at com.google.android.gms.maps.GoogleMap.setMyLocationEnabled(Unknown Source)
at anywheresoftware.b4a.objects.MapFragmentWrapper$1.onMapReady(MapFragmentWrapper.java:184)
... 14 more
--------- beginning of crash
FATAL EXCEPTION: main
Process: b4a.dji.waldo, PID: 26442
java.lang.RuntimeException: java.lang.SecurityException: my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION
at anywheresoftware.b4a.objects.MapFragmentWrapper$1.onMapReady(MapFragmentWrapper.java:197)
at com.google.android.gms.maps.zzab.zza(Unknown Source)
at com.google.android.gms.maps.internal.zzaq.dispatchTransaction(Unknown Source)
at com.google.android.gms.internal.maps.zzb.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at fb.b
com.google.android.gms.dynamite_mapsdynamite@12874022@12.8.74 (040308-204998136):20)
It happens because you cannot set the 'MyLocation Button Enabled' property to True.
See the tutorial:
https://www.b4x.com/android/forum/threads/google-maps.63930/#content