Android Question Google Maps

Richard Phipps

Member
Licensed User
I have installed the project posted by Erel https://www.b4x.com/android/forum/threads/b4x-b4xpages-googlemaps-example.120121/

WHen I compile I get and error but dont understand it. Could someone please explain how to over come this?

B4A Version: 11.00 BETA #1
Parsing code. (0.03s)
Java Version: 8
Building folders structure. (0.14s)
Running custom action. (0.17s)
Compiling code. (0.15s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.31s)
Linking resources Error
AndroidManifest.xml:29: error: resource integer/google_play_services_version (aka b4a.identity:integer/google_play_services_version) not found.
error: failed processing manifest.

This is in the manifest in the project. I did however change the sdkVersion to 30

'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="28"/>
<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.LightTheme)
'End of default text.

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
AddApplicationText(
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyA42KTVsMFLPHZxIpTjyYNdju1qkPQdTlU"/>
)
 

oparra

Well-Known Member
Licensed User
sdkVersion to 30

tools -> jetifier

1626725823696.png


library:

1626725882216.png
 
Upvote 0

oparra

Well-Known Member
Licensed User
demo api-key does not show map, create your own api-key in google account

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyA42KTVsMFLPHZxIpTjyYNdju1qkPQdTlU"/>
)
 

Attachments

  • Screenshot_20210719-163016.png
    Screenshot_20210719-163016.png
    20.9 KB · Views: 24
Upvote 0

oparra

Well-Known Member
Licensed User
Yes I got the API...do i have to pulish in play store to use the API? this is another complicated process :(
It is not complicated, if you have a google account you just have to create your project and you will get the api-key for android or web
 
Upvote 0
Top