Android Question #AdditionalRes reference in Google Maps Android v2 tutorial

TrevG

Member
Licensed User
Longtime User
Hi,

I have been trying to implement Google Maps by following to v2 Tutorial, however I keep hitting an error on #AdditionalRes

I am using:
Basic for Android 3.82
Android: SDK 19

The #AdditionalRes in my code is:

#AdditionalRes: c:\android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms

Error Message is:

Parsing code. Error
Error parsing program.
Error description: Attribute not supported: additionalres
Occurred on line: 4
#AdditionalRes: c:\android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms

Any help will be greatly appreciated....Regards Trevor
 

TrevG

Member
Licensed User
Longtime User
Fixed .....

I missed that in the instructions and had it in one of my other modules.

Thanks .... Trevor
 
Upvote 0

birnesoft

Active Member
Licensed User
Longtime User
Hi,

I have the same problem with the "\" on the end path

I am using:
Basic for Android 3.82
Android: SDK 20
Java 1.7067

my #AdditionalRes in my code is:

#AdditionalRes: C:\androidsdk\extras\google\google_play_services\libproject\google-play-services_lib\libs,com.google.android.gms

Error Message is:
Parsing code. 0.03
Compiling code. 0.08
Compiling layouts code. 0.00
Generating R file. Error
invalid resource directory name: C:\androidsdk\extras\google\google_play_services\libproject\google-play-services_lib\libs/google-play-services.jar
invalid resource directory name: C:\androidsdk\extras\google\google_play_services\libproject\google-play-services_lib\libs/google-play-services.jar.properties
 
Upvote 0

daniedb

Active Member
Licensed User
Longtime User
I have the same error, even with the "res"

B4A version 4.30
Parsing code. 0.00
Compiling code. 0.01
Compiling layouts code. 0.00
Generating R file. Error
invalid resource directory name: E:\Android Programming\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res/google-play-services.jar
invalid resource directory name: E:\Android Programming\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res/google-play-services.jar.properties

B4X:
#AdditionalRes: E:\Android Programming\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res,com.google.android.gms
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
#AdditionalRes:
you additional res does not match the error somehow...

invalid resource directory name: E:\Android Programming\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res/google-play-services.jar

Are you sure it is this line of code which causes the error?
 
Upvote 0

daniedb

Active Member
Licensed User
Longtime User
This is my Code

B4X:
#Region Activity Attributes
   #FullScreen: False
   #IncludeTitle: True
   #AdditionalRes: E:\Android Programming\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res,com.google.android.gms
#End Region

'Activity module
Sub Process_Globals

End Sub

Sub Globals
  Dim mFragment As MapFragment
  Dim gmap As GoogleMap
  Dim MapPanel As Panel
End Sub

Sub Activity_Create(FirstTime As Boolean)
  MapPanel.Initialize("")
  Activity.AddView(MapPanel, 0, 0, 100%x, 100%y)
  If mFragment.IsGooglePlayServicesAvailable = False Then
  ToastMessageShow("Google Play services not available.", True)
  Else
  mFragment.Initialize("Map", MapPanel)
  End If
End Sub
Sub Map_Ready
  Log("map ready")
  gmap = mFragment.GetMap
  If gmap.IsInitialized = False Then
  ToastMessageShow("Error initializing map.", True)
  Else
  gmap.AddMarker(36, 15, "Hello!!!")
  Dim cp As CameraPosition
  cp.Initialize(36, 15, gmap.CameraPosition.Zoom)
  gmap.AnimateCamera(cp)
  End If
End Sub

Error when trying to compile

B4A version 4.30
Parsing code. 0.00
Compiling code. 0.02

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. 0.00
Generating R file. Error
invalid resource directory name: E:\Android Programming\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res/google-play-services.jar
invalid resource directory name: E:\Android Programming\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res/google-play-services.jar.properties
 
Upvote 0

Vince

Member
Licensed User
Longtime User
Help...

Parsing code. Error
Error parsing program.
Error description: Attribute not supported: additionalres
Occurred on line: 14
#AdditionalRes: C:\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
 
Upvote 0

Vince

Member
Licensed User
Longtime User
Help : (

B4A version: 5.20
Parsing code. (0.00s)
Compiling code. (0.18s)
Compiling layouts code. (0.07s)
Generating R file. Error
AndroidManifest.xml:33: error: Error: No resource found that matches the given name (at 'value' with value '@Integer/google_play_services_version').
 
Upvote 0
Top