I am using Xamarin Forms with visual studio 2017 .. the new project is always has Xamarin.Forms v 2.3.3.191. The project doesn't work .. it stops on (InitializeComponent) on the MainPage .. just stops and nothing happening. I thought the problem is with Xamarin.Forms version, so I installed the update of Xamarin.Forms .. the version 2.5.0.121934 (Last Stable) Then when I rebulid the Android project it gives me that error
Severity Code Description Project File Line Suppression State Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Xamarin.Android.Support.Fragment, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'Xamarin.Android.Support.Fragment.dll'
And these are the packages
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Forms" version="2.5.0.121934" targetFramework="monoandroid60" />
I tried to update Xamarin.Android.Support.v7.AppCompat but it gives me an error
Severity Code Description Project File Line Suppression State Error Unable to resolve dependencies. 'Xamarin.Android.Support.v7.AppCompat 26.1.0.1' is not compatible with 'Xamarin.Forms 2.5.0.122203 constraint: Xamarin.Andr
Now I have two cases:
- Updating X.F to version 2.5.... and that throws an error System.IO.FileNotFoundException: Could not load assembly 'Xamarin.Android.Support.Fragment at rebuilding android project]
- Keep the X.F version at 2.4.... and that make the app crushes at some points
I am working with Android 6 Marshmallow API 23
PLEASE HELP ME
Target Framework
of your project to at least Android 7.0, if you need the latest Google AppCompat libaries, you need to target Android 8.0 – SushiHangover