Android Question Error googlemaps

jesuslizonsoluciones

Member
Licensed User
Longtime User
Hello
Basic4android I'm new and I'm testing with googlemaps demos and always gives me the following error on the next line of the program

If GoogleMap1.IsInitialized = False

java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.
Expected 4030500 but found 0. You must have the following declaration within the <application> element:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />


My manifest file is as follows

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: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<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.
AddManifestText( <permission
android:name="$PACKAGE$.permission.MAPS_RECEIVE"
androidrotectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>)

AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCAUkBCv9AO3k70AznAJbMNeKJVMzqjE00"/>)


I would appreciate your help
 

eps

Expert
Licensed User
Longtime User
You need to look at the manifest file itself, found in the Object directory for the app in question. It feels like it's the version number not being set which is at fault.
 
Upvote 0

jesuslizonsoluciones

Member
Licensed User
Longtime User
Hola y gracias por la rapida respuestas

Despues de seguir las instrucciones que me dijeron, ya no me da ningun errror, pero el mapa me sale en blanco y me salen dos botones de zoom + -

Mi manifest.xml es el siguiente:


'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: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<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.
AddManifestText( <permission
android:name="$PACKAGE$.permission.MAPS_RECEIVE"
androidrotectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>)

AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCN1TYuSAINOV8lUNz6J00XKgb__7ss-R8"/>)
AddApplicationText(<meta-data
android:name="com.google.android.gms.version"
android:value="4030500"/>)

AddPermission(android.permission.INTERNET)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(com.google.android.providers.gsf.permission.READ_GSERVICES)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
'End of default text.


I add the demo program I am using. The tests are being conducted in AVD

thanks
 

Attachments

  • googlemapsdemo.zip
    473.8 KB · Views: 237
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…