Bug 47591 - Could not load type AndroidFormsRendering.XFPageRendererView
Summary: Could not load type AndroidFormsRendering.XFPageRendererView
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Xamarin.Forms Previewer ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-11-21 17:52 UTC by John Miller [MSFT]
Modified: 2016-11-21 19:18 UTC (History)
2 users (show)

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

Actual Results Screenshot (84.93 KB, image/png)
2016-11-21 17:52 UTC, John Miller [MSFT]
Expected Results Screenshot (64.95 KB, image/png)
2016-11-21 17:52 UTC, John Miller [MSFT]
IDE Log (27.08 KB, text/plain)
2016-11-21 17:53 UTC, John Miller [MSFT]

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 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:

Description John Miller [MSFT] 2016-11-21 17:52:08 UTC
** Overview **

When using the following XAML, the previewer does not load the view. Instead, I see a red background with XFPageRenderView.

** Steps to Reproduce **

1. File->New Forms Portable Project
2. Update NuGet packages for Xamarin.Forms
3. If there is not a XAML page already, use this:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
  <Label Text="Test Says Hello" VerticalOptions="Center" HorizontalOptions="Center" />

4. Build the android project
5. Open the previewer with that XAML page side-by-side

** Actual Results **

See attached image.

** Expected Results **

See attached image of what the iOS render looks like. 

** Additional Info **

Attached is the ide log for this session. Note the exception:

[Error] MonoDroid: Could not load type 'AndroidFormsRendering.XFPageRendererView, XamarinFormsPreviewer.Android, Version=, Culture=neutral, PublicKeyToken=null'. Skipping JNI registration of type 'md5e940e1e778de0f856e343395a2f338c5/XFPageRendererView'.
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-11-21 12:41:42.8659] [Info] MonoDroid: UNHANDLED EXCEPTION:
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-11-21 12:41:43.1579] [Info] MonoDroid: System.TypeLoadException
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-11-21 12:41:43.4120] [Info] MonoDroid:   at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-11-21 12:41:43.6670] [Info] MonoDroid:   at System.Type.GetType (System.String typeName, System.Boolean throwOnError) [0x00011] in <3dc9ed3d31194319991e686734adcb10>:0 
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-11-21 12:41:43.9581] [Info] MonoDroid:   at Java.Interop.TypeManager.n_Activate (System.IntPtr jnienv, System.IntPtr jclass, System.IntPtr typename_ptr, System.IntPtr signature_ptr, System.IntPtr jobject, System.IntPtr parameters_ptr) [0x00082] in <23a8d9bf141f4ef5b5a764e32add1f40>:0 
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-11-21 12:41:44.3752] mono.android.DesignerException: md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.n_onMeasure(II)V....
Comment 1 John Miller [MSFT] 2016-11-21 17:52:25 UTC
Created attachment 18579 [details]
Actual Results Screenshot
Comment 2 John Miller [MSFT] 2016-11-21 17:52:42 UTC
Created attachment 18580 [details]
Expected Results Screenshot
Comment 3 John Miller [MSFT] 2016-11-21 17:53:04 UTC
Created attachment 18581 [details]
Comment 4 Alan McGovern 2016-11-21 19:17:33 UTC
This is nearly definitely fixed in C9. As such I'm just going to close this as you can get C9 builds in alpha and we are not backporting the changes.