Android Question Google Maps Help

scGuy

Member
Licensed User
I've been trying to make a test app that simply shows a google map, following this tutorial:

https://www.b4x.com/android/forum/threads/google-maps.63930/

So, I've followed the instructions exactly as described by Erel, *carefully* because I can't get enough of B4X but I have very limited knowledge of android sdk. When I get to the try it out stage, app will not compile, I get this error which I've seen others on the forum get also...

B4A Version: 8.80
Parsing code. (0.00s)
Building folders structure. (3.46s)
Compiling code. (0.34s)
Compiling layouts code. (0.06s)
Organizing libraries. (0.00s)
Generating R file. Error
AndroidManifest.xml:28: error: Error: No resource found that matches the given name (at 'value' with value '@Integer/google_play_services_version').

So I read down in the thread, and one thing mentioned is, do I actually have google play in my android\extras\google\google_play_services …? I did not, so I used the B4X IDE SDK Manager and downloaded *all* recommended packages, until it was all done... and I still didn't have it. Finding no way to get it installed, I tried to run the SDK Manager EXE that comes with android sdk… and it no longer exists... apparently it stopped being included around v24.

After ages of searching, I finally figured out how to install google play services from command line:

sdkmanager "extras;google;google_play_services"

...and this apparently worked, at least it appeared in "extras" folder. However, the B4X test project still fails to compile as shown above.

My Manifest is:

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.
AddPermission(android.permission.ACCESS_FINE_LOCATION)

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

AddApplicationText(
<meta-data
  android:name="com.google.android.geo.API_KEY"
  android:value="AI-YES-MY-KEY-WAS-HERE "/>
)

#AdditionalJar: com.google.android.gms:play-services-maps
It is specifically the following line that causes the compile error, but if I remove it the app fails immediately on startup:

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

This was included based on the link in the tutorial to here:

https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/

It seems things keep changing in the B4A and android sdk worlds so fast that the tutorial may no longer work, or I've missed something. Any advice is appreciated!
 
Top