Android Question error while creating a map.

Izmirov.Yaminovich

Member
Licensed User
Longtime User
Hi,

B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Private gmap As GoogleMap
    Private MapFragment1 As MapFragment
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Activity.LoadLayout("1")
    If MapFragment1.IsGooglePlayServicesAvailable = False Then
     ToastMessageShow("Nope", True)
    End If
End Sub

Sub MapFragment1_Ready
   gmap = MapFragment1.GetMap
   Dim m1 As Marker = gmap.AddMarker(10, 30, "test")
   m1.Snippet = "Trololol"
End Sub

Above are my code for the google map. Why is it not opening up? Anybody know what is happening?

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
You should upload your project (in the IDE under File-Export to zip) instead of posting incomplete info...
 
Upvote 0

Izmirov.Yaminovich

Member
Licensed User
Longtime User
upload_2016-7-21_11-51-2.png
upload_2016-7-21_11-51-23.png


I have added in the manifest and the coding, but it is still not working. Did I did something wrong? got my google api key as well, does that mean that I have to follow the link that I last posted and download another android studio?

Sorry I'm such a noob in this.
 
Upvote 0

Izmirov.Yaminovich

Member
Licensed User
Longtime User
I tried replacing it with
B4X:
#AdditionalRes: <google-play-services res folder>, com.google.android.gms
as shown in the tutorial, another error came out.

Generating R file. Error
AndroidManifest.xml:33: error: Error: No resource found that matches the given name (at 'value' with value '@Integer/google_play_services_version').

I am guessing I really need to download the Android studio to help me deal with this? Though I don't know what it does though.
 
Upvote 0
Top