ActivityIndicator on Android (KitKat) broken after updating Xamarin.Forms

ChrisMiller.1665ChrisMiller.1665 USMember
edited February 2016 in Xamarin.Forms

All,

I recently updated Xamarin.Forms from 1.4.2 to 1.4.3. After the update, I could no longer use ActivityIndicator in Android. After adding the AI to the content of a page, I would get the following exception. If I would build for Lollipop instead of Kitkat, I no longer get the exception, but the AI will never be displayed.
Any thoughts?

{System.MissingMethodException: Method 'ProgressBar.set_IndeterminateTintList' not found.   
at Xamarin.Forms.Platform.Android.ActivityIndicatorRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1 e) [0x0002d] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.ActivityIndicator].SetElement (Xamarin.Forms.ActivityIndicator element) [0x000fd] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.ActivityIndicator].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement view) [0x00020] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, Boolean sameChildren) [0x00023] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x0010b] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x0000d] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].SetElement (Xamarin.Forms.View element) [0x00119] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement view) [0x00020] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, Boolean sameChildren) [0x00023] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x0010b] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x0000d] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].SetElement (Xamarin.Forms.View element) [0x00119] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement view) [0x00020] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, Boolean sameChildren) [0x00023] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x0010b] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x0000d] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].SetElement (Xamarin.Forms.View element) [0x00119] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement view) [0x00020] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, Boolean sameChildren) [0x00023] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x0010b] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x0000d] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].SetElement (Xamarin.Forms.View element) [0x00119] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[Xamarin.Forms.View].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement view) [0x00020] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, Boolean sameChildren) [0x00023] in <filename unknown>:0    
at Xamarin.Forms.Platform.Android.VisualElementPackager.OnChildAdded (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x0000f] in <filename unknown>:0    
at Xamarin.Forms.Element.OnChildAdded (Xamarin.Forms.Element child) [0x00037] in <filename unknown>:0    
at Xamarin.Forms.Layout.OnInternalAdded (Xamarin.Forms.View view) [0x00000] in <filename unknown>:0    
at Xamarin.Forms.Layout.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00092] in <filename unknown>:0    
at (wrapper delegate-invoke) <Module>:invoke_void_object_NotifyCollectionChangedEventArgs (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)   
at (wrapper delegate-invoke) <Module>:invoke_void_object_NotifyCollectionChangedEventArgs (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)   
at System.Collections.ObjectModel.ObservableCollection`1[Xamarin.Forms.Element].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in <filename unknown>:0    
at System.Collections.ObjectModel.ObservableCollection`1[Xamarin.Forms.Element].OnCollectionChanged (NotifyCollectionChangedAction action, System.Object item, Int32 index) [0x00009] in <filename unknown>:0    
at System.Collections.ObjectModel.ObservableCollection`1[Xamarin.Forms.Element].InsertItem (Int32 index, Xamarin.Forms.Element item) [0x00024] in <filename unknown>:0    
at System.Collections.ObjectModel.Collection`1[Xamarin.Forms.Element].Add (Xamarin.Forms.Element item) [0x00023] in <filename unknown>:0    
at Xamarin.Forms.ObservableWrapper`2[Xamarin.Forms.Element,Xamarin.Forms.View].Add (Xamarin.Forms.View item) [0x0004d] in <filename unknown>:0    
at TurboVUiForms.BetterListView`1[TurboVUiForms.ConnectionItemModel].AddItem (TurboVUiForms.ConnectionItemModel item, Int32 idx) [0x00077] in /Users/chrismiller/Projects/SVN/XamarinTurbo/TurboVUiFormsSolution/TurboVUiForms/CustomControls/BetterListVIew.cs:229 }   System.MissingMethodException

Best Answer

Answers

  • CybersignalsCybersignals MXMember

    I have exactly the same problem with api level 21, with level 19 throws other error:

    Error APT0000: No resource identifier found for attribute 'touchscreenBlocksFocus' in package 'android' (APT0000) (p2p.Droid)

  • aunanueaunanue ARMember ✭✭

    Hi guys, same problem here on Kitkat: System.MissingMethodException: Method 'ProgressBar.set_IndeterminateTintList' not found.
    One of the Enhancements for Android was "Android ActivityIndicator Color property now works for Android 5.0+"
    perhaps not it doesn't work anymore for previous versions :-1:

    It raises the exception either setting or not the ActivityIndicator.Color

    Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.MissingMethodException: Method 'ProgressBar.set_IndeterminateTintList' not found.
    at at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
    at at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__0 (object)
    at Android.App.SyncContext/c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/1879/5f55a9ef/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18
    at Java.Lang.Thread/RunnableImplementor.Run () [0x0000b] in...

  • NMackayNMackay GBInsider, University mod

    Define it in an android theme and it seems to work on multiple android platforms rather than trying to style it in forms.

    https://forums.xamarin.com/discussion/37934/activity-indicator-color#latest

  • aunanueaunanue ARMember ✭✭
    Accepted Answer

    @ChrisMiller.7236 if you still have this problem, I have an aswer about this that solves the issue. You have to set the android to version 21. Check this post:

    http://forums.xamarin.com/discussion/44678/psa-you-must-set-your-target-compile-version-of-your-android-projects-to-21#latest

  • Thanks Ariel, that solved my issue!

  • SrihariKulkarniSrihariKulkarni INMember ✭✭

    I'm seeing the problem even after making my target version as 21.

  • RichardEdwardsRichardEdwards CAUniversity ✭✭

    I'm also still seeing the same issue @SrihariKulkarni

    I updated to version 21 for target and still getting the error. Did you find a solution?

  • SrihariKulkarniSrihariKulkarni INMember ✭✭

    I contacted Xamarin support and they opened this bug for the issue
    https://bugzilla.xamarin.com/show_bug.cgi?id=32068

Sign In or Register to comment.