Android Question Google maps

billmoultrie

Member
Licensed User
Longtime User
I am trying to run the program from the tutorial but I am getting stuck with the following error from the manifest.

B4X:
Parsing code.  0.12
Compiling code.  0.13
Compiling layouts code.  0.07
Generating R file.  Error
AndroidManifest.xml:37: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
The manifest code I am using for Google maps is.


B4X:
AddApplicationText(<meta-data

    android:name="com.google.android.maps.v2.API_KEY"

    android:value="AIzaSyBlSaGaL3LYUs5_1xxT6E4EdsBO5ODN9Z0"/


<meta-data android:name="com.google.android.gms.version"

android:value="@integer/google_play_services_version"

    />)

AddPermission(android.permission.ACCESS_NETWORK_STATE)
[/CODE]


What code should go in at this value: android:value="@integer/google_play_services_version"

Also the tutorial says that a reference should be put in to Google Play

#AdditionalRes: C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms

If I add this it gives an error in the manifest and also I can not find com.google.android.gms in the res file.

Help.
 

billmoultrie

Member
Licensed User
Longtime User
I am using Ver 3.50
I noticed your correspondence where you found that the android.value should be ="4323000", I inserted this and now the maps work, but
without the #AdditionalRes.

If I include #AdditionalRes I get the following error

B4X:
Parsing code.                          0.08
Compiling code.                        Error
Error parsing manifest script:
Line = 18, Word = (



My manifest, with #AdditionalRes is



B4X:
AddManifestText( <permission
          android:name="$PACKAGE$.permission.MAPS_RECEIVE"
          android:protectionLevel="signature"/>
      <uses-feature android:glEsVersion="0x00020000" android:required="true"/>)
 
AddApplicationText(<meta-data
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="AIzaSyBlSoGaL3LYUs5_1xxT6E4EdsBO5ODN9Z0"/>

  <meta-data android:name="com.google.android.gms.version"
  android:value="4323000" />
    #AdditionalRes: C:\android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms

    />)
AddPermission(android.permission.ACCESS_NETWORK_STATE)


But as I say without the #AdditionalRes it works fine.
 
Upvote 0
Top