Hi,
I already have the Mono.Android.dll in my project when i created it in VS 2019 and updated the version of Xamarin.forms to 4.8.0.167.
In my case, I do not want to migrate/update an existing Xamarin.Forms project that was created in VS 2017 because some libraries are no longer supported or some features are removed and also some nuget packages cannot be updated.
What I did was the following steps.
- Created a new project in VS 2019. I selected the template (Mobile App - Xamarin Forms - A multi project template for building apps with iOS and Android with Xamarin and Xamarin Forms.)
- Created the forms from scratch and adding the nuget packages one by one when needed. Not adding the existing (.xaml and .cs) files.
- Copied the inline XAML and c# code behind in both the xaml and cs files.
- Added the necessary files in both the Forms and Android project required for database handling, screen rendering (custom renderers etc for the controls and forms)
- Adding each form one by one till all the compilation errors are fixed.
The only compilation error seen is "The type or namespace name 'Android' could not be found (are you missing a using directive or an assembly reference?)"
Please refer to these links to understand it clearly.
https://stackoverflow.com/questions/54591881/xamarin-forms-platform-android-does-not-exist-after-xamarin-update-from-2-5-to-3
https://forums.xamarin.com/discussion/150321/the-type-or-namespace-name-android-does-not-exist-in-the-namespace-xamarin-forms-platform
My question is how can we add this namespace Xamarin.Forms.Platform.Android to a Xamarin.Forms 4.8.0.167 version so that the existing code works.
private Stream GetImageStream(Android.Graphics.ImageFormatType imgFormat)
bool SaveSignatureImage(Android.Graphics.Bitmap BitmapImage);
Hope that I have explained it clearly what is missing in the latest version of Xamarin.Forms.
The above mentioned 2 threads talk about reverting to an earlier version of Xamarin.Forms but we are already in 4.8.0.167 now and reverting back to an earlier version is out of the question.
Thanks,
Rajesh.