Forum Xamarin.Android

Google Glass Support in Installation/ Missing Libraries

Hi all,

I'm having a bit of a trouble getting the Google Glass API (GDK) to work with the Xamarin studio I have on my Mac. I've installed all necessary libraries through the Studio (I think). But when I try to load the resource: using Android.Glass.Timeline. I keep getting build errors such as the 'Glass' namespace not existing. I've checked the ADT bundles and SDK Manager ensuring its existence.

Your input and help here will be greatly appreciated.

Regards,
Shreyas

Posts

  • I'm attaching pictures to show that I've got all the SDK's based on the Android SDK Manager and also Xamarin has the Android SDK's loaded.

  • Updated picture with it working on ADT...

  • Some more pictures of how I setup Xamarin....

    The actual errors:
    /Users/shreyasxramesh/Documents/Personal/Development/GoogleGlassSampleStopwatch/SampleStopwatch/StopwatchService.cs(15,15): Error CS0234: The type or namespace name Glass' does not exist in the namespaceAndroid'. Are you missing an assembly reference? (CS0234) (SampleStopwatch)
    /Users/shreyasxramesh/Documents/Personal/Development/GoogleGlassSampleStopwatch/SampleStopwatch/StopwatchService.cs(11,11): Error CS0246: The type or namespace name TimelineManager' could not be found. Are you missing an assembly reference? (CS0246) (SampleStopwatch) /Users/shreyasxramesh/Documents/Personal/Development/GoogleGlassSampleStopwatch/SampleStopwatch/StopwatchService.cs(11,11): Error CS0246: The type or namespace nameLiveCard' could not be found. Are you missing an assembly reference? (CS0246) (SampleStopwatch)

  • ChrisHardyChrisHardy GBForum Administrator, Xamarin Team Xamurai

    Hey Sheryas,

    You'll need to download the Xamarin Google Glass component separately from the Component Store to get access to those APIs from the GDK, you can download this from https://components.xamarin.com/view/googleglass

    Let me know if you have any further problems,

    ChrisNTR

  • Did all of that - which is where the Sample app originated :(. Is there a specific folder I should be copying this into so it may pick it up?

  • ChrisHardyChrisHardy GBForum Administrator, Xamarin Team Xamurai

    It looks like the components folder is empty from the project screenshot from above, it should look something like this: http://screencast.com/t/HbUfJmzA7W9 - can you double click the "Components" folder and see if you can add in the component to that specific project again?

  • That resolved the initial error, which was followed by:
    /Users/shreyasxramesh/Documents/Personal/Development/GoogleGlassSampleStopwatch/SampleStopwatch/StopwatchService.cs(32,32): Error CS1061: Type Android.Glass.Timeline.TimelineManager' does not contain a definition forGetLiveCard' and no extension method GetLiveCard' of typeAndroid.Glass.Timeline.TimelineManager' could be found. Are you missing an assembly reference? (CS1061) (SampleStopwatch)

    /Users/shreyasxramesh/Documents/Personal/Development/GoogleGlassSampleStopwatch/SampleStopwatch/StopwatchService.cs(14,14): Error CS1061: Type Android.Glass.Timeline.LiveCard' does not contain a definition forEnableDirectRendering' and no extension method EnableDirectRendering' of typeAndroid.Glass.Timeline.LiveCard' could be found. Are you missing an assembly reference? (CS1061) (SampleStopwatch)

    /Users/shreyasxramesh/Documents/Personal/Development/GoogleGlassSampleStopwatch/SampleStopwatch/StopwatchService.cs(14,14): Error CS1061: Type Android.Glass.Timeline.LiveCard' does not contain a definition forSetNonSilent' and no extension method SetNonSilent' of typeAndroid.Glass.Timeline.LiveCard' could be found. Are you missing an assembly reference? (CS1061) (SampleStopwatch)

    Would you know if these are expected?

  • Ok take that back - a subsequent Clean and Build came back to the earlier error message:

    /Users/shreyasxramesh/Documents/Personal/Development/GoogleGlassSampleStopwatch/SampleStopwatch/StopwatchService.cs(15,15): Error CS0234: The type or namespace name Glass' does not exist in the namespaceAndroid'. Are you missing an assembly reference? (CS0234) (SampleStopwatch)

    Aka Glass package not found issue...

  • ChrisHardyChrisHardy GBForum Administrator, Xamarin Team Xamurai

    Can you zip over the demo project? Something isn't quite right here for some reason.

    Thanks!

  • Let me know if this helps...

  • AlexSotoAlexSoto MXXamarin Team Xamurai

    Hello @ShreyasRamesh

    Somehow your component installation got corrupted, so in order to fix this follow this steps

    1. Open you solution and delete the component reference
    2. Open your solution folder and close your solution on XS
    3. Delete the component folder inside your solution folder
    4. Go to ~/Library/Caches/Xamarin and delete the content related to Glass
    5. Reopen your solution in XS and add the Glass component to the sample
    6. Enjoy!

    I made a little screencast showing the whole process in case I am not being so clear ;)
    http://www.screencast.com/t/GSb1uCuq

    Hope this helps

    Alex

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    @AlexSoto Maybe it would be good if you could provide this step by step guide onto the tutorial section at Xamarin.com. I think it will help other like me that want to keep there systems free from outdated component downloads. What do you think?

  • Hi Alex & Chrisntr - I've got the build to compile now after Alex's steps highlighted. Thanks! And I do agree with Sebastian to have these steps put on Xamarin.com of sorts.

Sign In or Register to comment.