Android Question [B4XPages] Errors when trying to run GoogleMaps Example

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!

I'm starting to use B4XPages and I'm studying several useful for my needs examples.
Trying to run the GoogleMaps example, the first error I was having without try to debug, was at compiling process and it is the following:
B4X:
Generating R file.    Error
AndroidManifest.xml:29: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
Then I added to the manifest the lines of the GoogleMaps2 library example and added the 2 additional jars (maps and location).
The compilation was successful but at runtime I have the following:
B4X:
java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
    at anywheresoftware.b4a.objects.MapFragmentWrapper$1.onMapReady(MapFragmentWrapper.java:197)
    at com.google.android.gms.maps.zzab.zza(Unknown Source:2)
    at com.google.android.gms.maps.internal.zzaq.dispatchTransaction(Unknown Source:12)
    at com.google.android.gms.internal.maps.zzb.onTransact(Unknown Source:12)
    at android.os.Binder.transact(Binder.java:921)
    at da.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (120408-0):2)
    at com.google.maps.api.android.lib6.impl.be.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (120408-0):2)
    at android.os.Handler.handleCallback(Handler.java:900)
    at android.os.Handler.dispatchMessage(Handler.java:103)
    at android.os.Looper.loop(Looper.java:219)
    at android.app.ActivityThread.main(ActivityThread.java:8347)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
    at anywheresoftware.b4a.objects.MapFragmentWrapper$1.onMapReady(MapFragmentWrapper.java:184)
    ... 13 more
What is going wrong?

Thank you in advance!
 

TILogistic

Expert
Licensed User
Longtime User
review SDK Manager and Manifest.

Note: the api key that the demo brings does not show the map.
 

Attachments

  • map.jpg
    map.jpg
    415.8 KB · Views: 206
Last edited:
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
no need to add service jars.

only librery googlemaps 2.5 download.

1597717355605.png


read:

 
Last edited:
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Generating R file. Error
AndroidManifest.xml:29: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').


 
Upvote 0

vfafou

Well-Known Member
Licensed User
Longtime User
no need to add service jars.

only librery googlemaps 2.5 download.

View attachment 98733

read:

Thank you very much @oparra!
My only problem was that I hadn't seen the library update! My version was 2.02.
;)
 
Upvote 0
Top