Tuesday 1 October 2013

Maps and Location Demo v2 - Android.Gms namespace missing

Maps and Location Demo v2 - Android.Gms namespace missing

I have been following the Maps and Location Demo V2 on Xamarin's github,
and have run into a very frustrating problem. I have linked the
project.properties file of google-play-services_lib to the
GooglePlayServices_Froyo project. I have then added a project reference to
SimpleMapDemo_Froyo, pointing to GooglePlayServices_Froyo.
At this stage, the solution builds perfectly fine, but for some reason
when looking at SimpleMapActivity I am finding that the Android.Gms
namespace appears to be missing (i.e. Gms appears red and hovering over it
states "Cannot resolve symbol 'Gms'"). This results in all of the
contained classes appearing to be unresolved (LatLng, GoogleMap,
SupportMapFragment, GoogleMapOptions etc).
The odd thing is that despite this, the solution does compile and run on
the emulator I am using, so it would appear that the references are in
fact working fine and Visual Studio is just having a bit of a hernia.
Would anyone happen to know how I can correctly resolve these references
so that I'm not being blasted with a tonne of red text? I should mention
that google-play-services_lib is fully updated, as are all of the relevant
items from the Android Sdk.
As a side note, I'm electing to go with this method of binding the Google
Play Services library instead of using the component available from
Xamarin as the component seems to result in linking errors when Linking is
set to Sdk Assemblies Only.

No comments:

Post a Comment