AppCompat rev 21 release?

Crave_ErikCrave_Erik NLMember
edited October 2014 in Xamarin.Android

Hi all,

Is there a release date set for an update of the Xamarin.Android.Support.v7.AppCompat component? Rev 21 was released last Friday and is quite comprehensive, I would like to get started with it as soon as possible. If there is normally a large time gap between update of library and update of component I guess I'll make my own binding, but I prefer to use the component!

Thanks

P.S.: My apologies if this thread belongs in the Component Store section

Posts

  • JeremyKolbJeremyKolb USMember ✭✭✭

    Hopefully the nuget package as well. I prefer those to components.

  • JeremyKolbJeremyKolb USMember ✭✭✭

    I tried that with the alpha build and I couldn't get it to work so I'm waiting for the stable release.

  • @JeremyKolb‌ For build it, you will need Xamarin.Android 5.0 that is not public yet.

  • Martijn00Martijn00 NLInsider, University ✭✭✭

    I tried to implement it, but after fixing all the errors i got stuck on this one:
    Error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

    Anyone knows a solution for that?

  • JeremyKolbJeremyKolb USMember ✭✭✭

    @Martijn00 I had the same problem and gave up. You may want to file a bug at bugzilla.xamarin.com

  • Crave_ErikCrave_Erik NLMember

    I guess it won't work until we have support for API level 21. Hopefully soon!

  • Martijn00Martijn00 NLInsider, University ✭✭✭

    I found out that i only get the error when using the Xamarin Alpha release. When i am on the Stable channel that error is gone, but i can't use the Android Lollipop anymore. So no solution for that.

  • Martijn00Martijn00 NLInsider, University ✭✭✭

    Xamarin has updated their beta channel. After i switched to that one the error was gone, but i got another problem. I use this code:

    Toolbar toolbar = (Toolbar) FindViewById(Resource.Id.toolbar);

    It crashes with this error:

    System.InvalidCastException: Cannot cast from source type to destination type.
    at BMM.UI.Droid.MainActivity.OnCreate (Android.OS.Bundle) [0x00021] in MainActivity.cs:40
    at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/812ca135/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2380
    at at (wrapper dynamic-method) object.1786ebe0-7ce2-4769-bdf3-efa7f12a1f00 (intptr,intptr,intptr)

  • Martijn00Martijn00 NLInsider, University ✭✭✭
    edited November 2014

    Arg! This:

    Toolbar toolbar = (Toolbar) FindViewById(Resource.Id.toolbar);

    Should be off course:

    Toolbar toolbar = FindViewById >Toolbar> (Resource.Id.toolbar);

  • NeelaNeela USMember, University
    edited November 2014

    Build continues to fail with v7.AppCompat, Support.v13 & Support.v4 @ v21.0.0.0-bata1.

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task LinkAssemblies: error XA2006: Reference to metadata item 'System.Void Android.Graphics.Drawables.Drawable::SetHotspot(System.Single,System.Single)' (defined in 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved.
    Build FAILED.

    Any ETA on a stable channel release will be helpful.

  • JeremyKolbJeremyKolb USMember ✭✭✭

    @Neela: File a bug with Xamarin at bugzilla.xamarin.com

  • DavidM.5773DavidM.5773 USMember
    edited November 2014

    @Martijn00‌ What syntax is this:

    Toolbar toolbar = FindViewById >Toolbar> (Resource.Id.toolbar);

    How did you solve the error with this? I tried your syntax but I'm getting:

    'Android.Support.V7.Widget.Toolbar' is a 'type', which is not valid in the given context

  • DavidM.5773DavidM.5773 USMember

    Ok, I figured it out. Apparently type casting is like...not the thing to do anymore, and @Martijn00‌ found the solution, but had a typo on the forum here. If you are trying to cast something from FindViewById, you should use the generic version of the method and insert your desired type, apparently:

    Toolbar toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);

  • C.BoerC.Boer NLMember

    Please release a stable version of version 21.0.2 of the support library. We still can't use the new Lollipop functionality without the support library.

  • Has anyone been able to get AppCompat 21 to compile yet?

  • Martijn00Martijn00 NLInsider, University ✭✭✭

    I have integrated it in my app, and most things work fine.

  • @Martijn00‌ I got it working. My problem was that I was using AppCompat v20 instead of v21. I needed to check off Show pre-release packages to reveal it in NuGet

  • Crave_ErikCrave_Erik NLMember

    So is the component going to be updated or should we make the switch to NuGet?

  • JeremyKolbJeremyKolb USMember ✭✭✭

    They will both be updated once a stable version is out. Prerelease is nuget only as far as I know.

Sign In or Register to comment.