Hi everyone!
I'm following the tutorial by Erel, and can't seem to get it working.
- I registered a project in Google developer console and got an API key
- Copied the libraries in the tutorial to the additional folder
- Added the reference to google maps library
- added to the manifest
And I'm getting this error when I try to compile it:
AndroidManifest.xml:29: error: resource integer/google_play_services_version (aka b4a.example:integer/google_play_services_version) Not found
Any help is much appreciated!!
Thank you ?
My code:
My manifest (just changed my API key here a bit)
Libraries selected:
I'm following the tutorial by Erel, and can't seem to get it working.
- I registered a project in Google developer console and got an API key
- Copied the libraries in the tutorial to the additional folder
- Added the reference to google maps library
- added to the manifest
And I'm getting this error when I try to compile it:
AndroidManifest.xml:29: error: resource integer/google_play_services_version (aka b4a.example:integer/google_play_services_version) Not found
Any help is much appreciated!!
Thank you ?
My code:
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
Private rp As RuntimePermissions
End Sub
Sub Globals
Private gmap As GoogleMap
Private MapFragment1 As MapFragment
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layout")
Wait For MapFragment1_Ready
gmap = MapFragment1.GetMap
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
gmap.MyLocationEnabled = True
Else
Log("No permission!")
End If
End Sub
My manifest (just changed my API key here a bit)
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="14" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
AddApplicationText(
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBfRS9SZ_6Q797PdyOqywGtpYlWXXXXXXXXX"/>
)
AddApplicationText(
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
)
Libraries selected: