Xamarin forms - multiple errors when trying to build

wanna_be_programmer 1 Reputation point
2022-08-27T10:07:36.743+00:00

Hello,

I have been trying to make an app according to the course I bought. I had no errors but when I tried to deploy it, serveral errors has occured.

I know it is a mess, but I simply can´t find any solution fot this problem....

This are the errors that I receive:

CS1503 Argument 1: cannot convert from 'Objednajto.Droid.MainActivity' to 'Android.App.Activity'

CS1503 Argument 1: cannot convert from 'Objednajto.Droid.MainActivity' to 'Android.Content.Context'

CS0117 'FormsAppCompatActivity' does not contain a definition for 'OnRequestPermissionsResult'

CS0115 'MainActivity.OnRequestPermissionsResult(int, string[], Permission[])': no suitable method found to override

CS0012 The type 'FragmentActivity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.AndroidX.Fragment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

235473-image-2022-08-27-120357574.png

I tried:
Instaling "Xamarin.AndroidX.Fragment"

Downgrading "Xamarin.AndroidX.Fragment"

Use Quick action to install "Xamarin.AndroidX.Fragment", but nothing happened

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
939 questions
{count} votes

1 answer

Sort by: Most helpful
  1. wanna_be_programmer 1 Reputation point
    2022-10-24T03:25:05.803+00:00

    Okay, so I solved this problem by deleting my project and started form clean start. After this everything works fine.

    0 comments No comments