Error in MainActivity.cs screen for platform specific code after updating Xamarin.Forms to latest version.

DN 0 Reputation points
2024-01-19T10:11:20.84+00:00

I have an app built that was using 'Xamarin.Forms 4.1.0.778454' and 'Xamarin.Forms.GoogleMaps 3.0.4'. In one of the recent build the Google map stopped loading. I verified the 'Api Key' which was correct. I came across an article which suggested to update the Xamarin forms and I updated it to the latest version ie. 5.0.0.2622 and 'Xamarin.Forms.GoogleMaps 5.0.0' On updating the above packages and other dependencies, the mainactivity.cs gives error for 'using Xamarin.Forms.Platform.Android' Error: The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform' (are you missing an assembly reference?)

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,608 questions
{count} votes