You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Xamarin Forms project that is using version 2.2.6 of Forms9Patch and being compiled for Android 9. However, as in November on Google Play, only applications compiled with Android 10 will be accepted. I am changing this project of mine to be compiled with Android 10.
Compiling on Android 10 and forms9Patch version 2.2.6 when using the ToPngService.ToPngAsync routine the application freezes, it is just that function.
I found another topic here on GitHub related to a bug in Android 10 and then I decided to update my project's Forms9Patch to version 2.4.6. However after I updated it, the ToPngService.ToPngAsync routine simply gives the message "System.InvalidCastException: Specified cast is not valid." and close the application.
I was able to reproduce this situation in the sample source attached to this task.
Steps to Reproduce
HTML to PDF service
Android 10
Basic Information
Version with issue: 2.4.6
Last known good version: 2.2.6
IDE: Visual Studio Community 2019 - 16.7.7
Android: Android 10
Affected Devices: Samsung SM-P205 (Android 10)
Reproduction Link - a link to a small demo project that reproduces this issue
First, thank you for taking the time to create a demo project. As a result, you were bumped ahead of another issue that did not make the effort.
Second, please accept my apologies for not responding sooner. This is a volunteer effort and, in general, things that pay the bills take priority.
Here is what I've learned
You have not initiated Forms9Patch in your platform project. In MyMvvmCrossApp1.Droid/Views/MainActivity.cs, you need to add the following immediately after Platform.Init(this, bundle);
Forms9Patch.Droid.Settings.Initialize(this);
You didn't install Forms9Patch nuget package in your Android platform projects.
After the above two steps, everything appears to be working. I have no idea how, with earlier versions of Forms9Patch, you were able to have a working project without the above elements.
Description
I have a Xamarin Forms project that is using version 2.2.6 of Forms9Patch and being compiled for Android 9. However, as in November on Google Play, only applications compiled with Android 10 will be accepted. I am changing this project of mine to be compiled with Android 10.
Compiling on Android 10 and forms9Patch version 2.2.6 when using the ToPngService.ToPngAsync routine the application freezes, it is just that function.
I found another topic here on GitHub related to a bug in Android 10 and then I decided to update my project's Forms9Patch to version 2.4.6. However after I updated it, the ToPngService.ToPngAsync routine simply gives the message "System.InvalidCastException: Specified cast is not valid." and close the application.
I was able to reproduce this situation in the sample source attached to this task.
Steps to Reproduce
Basic Information
Reproduction Link - a link to a small demo project that reproduces this issue
MyMvvmCrossApp1.zip
The text was updated successfully, but these errors were encountered: