Bug 32068 - Adding an ActivityIndicator to a ContentPage in Forms 1.4.3 causes an exception to be thrown
Summary: Adding an ActivityIndicator to a ContentPage in Forms 1.4.3 causes an excepti...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.4.3
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-17 08:23 UTC by Adam Hartley [MSFT]
Modified: 2016-04-11 08:11 UTC (History)
8 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Adam Hartley [MSFT] 2015-07-17 08:23:53 UTC
## Overview

Adding an ActivityIndicator to a ContentPage in Forms 1.4.3 causes an exception to be thrown

## Steps to reproduce

1. Download the IBM Worklight sample from here: https://components.xamarin.com/view/ibm-worklight
2. Update Xamarin.Forms package to 1.4.3
3. Run on an emulator / device 
4. Exception is thrown

## Expected result

No exception

## Actual result

>Java.Lang.RuntimeException: java.lang.reflect.InvocationTargetException
>  at --- End of managed exception stack trace ---
>  at java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
>  at Caused by: java.lang.reflect.InvocationTargetException
>  at at java.lang.reflect.Method.invoke(Native Method)
>  at at java.lang.reflect.Method.invoke(Method.java:372)
>  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
>  at ... 1 more
>  at Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.MissingMethodException: Method 'ProgressBar.set_IndeterminateTintList' not found.
>  at at Xamarin.Forms.Platform.Android.ActivityIndicatorRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1<Xamarin.Forms.ActivityIndicator>) <IL 0x0002e, 0x001bb>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.ActivityIndicator>.SetElement (Xamarin.Forms.ActivityIndicator) <0x0081f>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.ActivityIndicator>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <0x00133>
>  at at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x00022, 0x0016f>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement,Xamarin.Forms.Platform.Android.IVisualElementRenderer,Xamarin.Forms.Platform.Android.RendererPool,bool) <IL 0x00024, 0x0019b>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement,Xamarin.Forms.VisualElement) <IL 0x00114, 0x0082f>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () <IL 0x0000d, 0x0008b>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager) <0x00087>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.SetElement (Xamarin.Forms.View) <0x008f3>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <0x00133>
>  at at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x00022, 0x0016f>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement,Xamarin.Forms.Platform.Android.IVisualElementRenderer,Xamarin.Forms.Platform.Android.RendererPool,bool) <IL 0x00024, 0x0019b>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement,Xamarin.Forms.VisualElement) <IL 0x00114, 0x0082f>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () <IL 0x0000d, 0x0008b>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager) <0x00087>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.SetElement (Xamarin.Forms.View) <0x008f3>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.View>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <0x00133>
>  at at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x00022, 0x0016f>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement,Xamarin.Forms.Platform.Android.IVisualElementRenderer,Xamarin.Forms.Platform.Android.RendererPool,bool) <IL 0x00024, 0x0019b>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement,Xamarin.Forms.VisualElement) <IL 0x00114, 0x0082f>
>  at at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () <IL 0x0000d, 0x0008b>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.Page>.SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager) <0x00087>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.Page>.SetElement (Xamarin.Forms.Page) <0x008f3>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.Page>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <0x00133>
>  at at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x00022, 0x0016f>
>  at at Xamarin.Forms.Platform.Android.NavigationRenderer.SwitchContentAsync (Xamarin.Forms.Page,bool,bool) <IL 0x00035, 0x0022f>
>  at at Xamarin.Forms.Platform.Android.NavigationRenderer.OnPushAsync (Xamarin.Forms.Page,bool) <IL 0x00004, 0x00057>
>  at at Xamarin.Forms.Platform.Android.NavigationRenderer.PushViewAsync (Xamarin.Forms.Page,bool) <IL 0x00003, 0x0005f>
>  at at Xamarin.Forms.Platform.Android.NavigationRenderer.<OnElementChanged>b__0 (Xamarin.Forms.Page) <IL 0x00003, 0x0004f>
>  at at Xamarin.Forms.EnumerableExtensions.ForEach<Xamarin.Forms.Page> (System.Collections.Generic.IEnumerable`1<Xamarin.Forms.Page>,System.Action`1<Xamarin.Forms.Page>) <0x00157>
>  at at Xamarin.Forms.Platform.Android.NavigationRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1<Xamarin.Forms.NavigationPage>) <IL 0x000ee, 0x00a6b>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.NavigationPage>.SetElement (Xamarin.Forms.NavigationPage) <0x0081f>
>  at at Xamarin.Forms.Platform.Android.VisualElementRenderer`1<Xamarin.Forms.NavigationPage>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <0x00133>
>  at at Xamarin.Forms.Platform.Android.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x00022, 0x0016f>
>  at at Xamarin.Forms.Platform.Android.Platform.AddChild (Xamarin.Forms.VisualElement,bool) <IL 0x00016, 0x000db>
>  at at Xamarin.Forms.Platform.Android.Platform.SetPage (Xamarin.Forms.Page) <IL 0x00093, 0x0058b>
>  at at Xamarin.Forms.Platform.Android.FormsApplicationActivity.InternalSetPage (Xamarin.Forms.Page) <IL 0x000be, 0x005b7>
>  at at Xamarin.Forms.Platform.Android.FormsApplicationActivity.SetMainPage () <IL 0x0000c, 0x00077>
>  at at Xamarin.Forms.Platform.Android.FormsApplicationActivity.LoadApplication (Xamarin.Forms.Application) <IL 0x0002e, 0x001c7>
>  at WorklightSample.Android.MainActivity.OnCreate (Android.OS.Bundle) [0x00025] in /Users/Adam/Downloads/ibm-worklight-7.0.0.1/samples/WorklightSample/Android/MainActivity.cs:30
>  at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/1879/5f55a9ef/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.App.Activity.cs:2475
>  at at (wrapper dynamic-method) object.a0d340f0-b4aa-452e-8c5a-5d01c976ad60 (intptr,intptr,intptr) <IL 0x00017, 0x0004b>
>  at at md565069db2e78e5e7262f8b4910e8912f7.MainActivity.n_onCreate(Native Method)
>  at at md565069db2e78e5e7262f8b4910e8912f7.MainActivity.onCreate(MainActivity.java:31)
>  at at android.app.Activity.performCreate(Activity.java:5990)
>  at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
>  at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
>  at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
>  at at android.app.ActivityThread.access$800(ActivityThread.java:151)
>  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
>  at at android.os.Handler.dispatchMessage(Handler.java:102)
>  at at android.os.Looper.loop(Looper.java:135)
>  at at android.app.ActivityThread.main(ActivityThread.java:5254)
>  at ... 4 more

## Notes

This does not happen with Xamarin.Forms 1.4.2, only on 1.4.3 and above.

https://forums.xamarin.com/discussion/comment/139670#Comment_139670
Comment 2 Jason Smith [MSFT] 2015-07-17 16:54:01 UTC
Make sure your apps compile target is set to latest. This does not impact your minimum version.
Comment 3 Chris King 2015-07-24 14:16:12 UTC
Repros on my physical Google Nexus. Doesn't repro on my iOS simulator.
Comment 4 Adam Hartley [MSFT] 2015-07-24 15:17:46 UTC
Providing my copy of the sample which appears to work fine after I changed the target framework from 4.4 to 5.0. I also updated all the packages to the latest versions and enabled ReceiveWapPush in AnroidManifest.xml

https://drive.google.com/file/d/0B3WrxROLAJ68djFjM0czdVZ5MTg/view?usp=sharing

Was able to run the app fine on API 19
Comment 5 toddkrokowski 2015-07-31 21:56:32 UTC
Does not run on API 21 with forms v1.4.3 - I cannot upgrade to forms v1.4.4 due to bug 32162:

https://bugzilla.xamarin.com/show_bug.cgi?id=32162
Comment 6 Venkata Koppaka 2015-08-19 12:07:00 UTC
Seeing the same issue even after Target API is set to 21 with XF 1.4.4
Comment 7 Rob Ringham 2015-09-18 16:31:56 UTC
Can this bug please be raised in priority? I'm seeing the exact same thing as others, particularly RE: API 21 with forms v1.4.3.
Comment 8 Adam Hartley [MSFT] 2015-09-22 11:25:19 UTC
Hi Rob,

Could you provide a sample that will allow us to reproduce the issue?

Thanks!
Comment 9 Wayne 2015-09-29 11:03:15 UTC
I'm also seeing this exception after upgrading from Xamarin 1.4.3.6358-pre2 to Xamarin 1.5.0.6447 on android on my Samsung Galaxy Tab 2 device.  We're using API 19.
Comment 10 Adam Hartley [MSFT] 2015-09-29 11:55:05 UTC
Hi Wayne,

Could you provide a sample that will allow us to reproduce the issue?

You can send us an email at contact@xamarin.com if you do not wish for your code to be public.

Thanks!
Comment 12 Adam Hartley [MSFT] 2015-10-05 09:16:36 UTC
Was able to reproduce the issue, but only when target framework was 4.4.

Changing target framework to 5.0 did not cause the exception to be thrown - similar to my previous comment https://bugzilla.xamarin.com/show_bug.cgi?id=32068#c4
Comment 13 Jason Smith [MSFT] 2016-04-11 08:11:04 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
 
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team