Blank Android App Package Installation Error

Viewed 135

I'm moving from console application to Mobile in F#, since I have a project which are intended to be on mobiles. But when I create a project in VS 2019 I get the Package Installation Error

Could not add all required packages to the project. The following packages failed to install from '....'

FSharp.Core.4.6.2: Unable to find version '4.6.2' of package 'FSharp.Core'. Xamarin.Android.FSharp.ResourceProvider.1.0.0.28: Unalbe to find version '1.0.0.28' of package 'Xamarin.Anroid.FSharp.REsourceProvider'.

I have tried to add them through nuget afterward. But it does not fix it. I have downgraded FSharp.Core to 4.6.2 to make sure that this is not the issue. The other package are the right version.

When I Run the default program, it report the error that it can not find things which are in FSharp.Core (type int) and in Xamarin.Android.FSharp.ResourceProvider (Button.Click.Add method), even though I have manually added those.

1 Answers

It looks like Microsoft released a "fix" for this already, but in August 2020 with the latest version, I still have the issue. However, if you scroll down in the comments, it looks like others have been able to fix this by installing the Xamarin.Android.FSharp.ResourceProvider package.

I personally had to do other things as well, such as install the Fsharp.Core package from the nuget window as well as adding a System.Numerics reference for the strange int related errors. I think the System.Numerics assembly is the last piece for you to get it working. Just right-click references in the solution explorer and choose "add reference" and find System.Numerics.

Related