Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

'Plugin.Iconize.Fonts.FontAwesomeCollection' threw an exception

$
0
0

I'm trying to use the Xam.Pugin.Iconize.FontAwesome nuget package with my xamarin.forms shared app (targeting Android only). The app compiles fine, but when running the app, I get the following exception:

System.TypeInitializationException: The type initializer for 'Plugin.Iconize.Fonts.FontAwesomeCollection' threw an exception.

I have the following nugets installed (all are the latest versions):

Xam.FormsPlugin.Iconize 1.5.0.13-beta
Xam.Plugin.Iconize 2.0.0.37-beta
Xam.Pugin.Iconize.FontAwesome 2.0.0.37-beta

My version of xamarin.forms is 2.5.1527436, which is within the required version range required by Iconize (>= 2.3.5 && < 3.0.0).

As per the instructions on the Xam.FormsPlugin.Iconize web page, in my OnCreate(Bundle bundle) method in MainActivity.cs I have set as follows:

base.OnCreate (bundle);
global::Xamarin.Forms.Forms.Init (this, bundle);
Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule());
FormsPlugin.Iconize.Droid.IconControls.Init(Resource.Id.toolbar, Resource.Id.tabs);

The only version of Xam.Pugin.Iconize.FontAwesome I can get working is the 1.5.0.13-beta release, but this has lots of icons missing from the current FontAwesome collection, so would like to get the latest package working. Alternatively is there an easier way to use FontAwesome in a xamarin.forms shared project?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>