An exception appears when trying to launch the application:
android.runtime.JavaProxyThrowable: System.NotSupportedException: Cannot create instance of type 'Syncfusion.Maui.Core.Platform.LayoutViewGroupExt': no Java peer type found.
at Java.Interop.JniPeerMembers.JniInstanceMethods..ctor(Type )
at Java.Interop.JniPeerMembers.JniInstanceMethods.GetConstructorsForType(Type )
at Java.Interop.JniPeerMembers.JniInstanceMethods.StartCreateInstance(String , Type , JniArgumentValue* )
at Android.Views.ViewGroup..ctor(Context )
at Microsoft.Maui.Platform.LayoutViewGroup..ctor(Context context)
at Syncfusion.Maui.Core.Platform.LayoutViewGroupExt..ctor(Context context, IDrawable drawable)
at Syncfusion.Maui.Core.SfViewHandler.CreatePlatformView()
Hi Daniil,
As per the shared information, we have checked the reported runtime exception with the simple calendar sample and we are unable to reproduce the exception from our end. We have checked with the following version.
Syncfusion calendar version – 21.2.10
Syncfusion core version – 21.2.10
If possible can you please share the below details to us, it would be helpful for us to analyze and provide you a solution at the earliest.
Replication procedure or Video
Code snippet
Syncfusion Calendar version
Regards,
Indumathi R
Syncfusion calendar version – 21.2.10
Syncfusion core version – 21.2.10
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Course.MainPage"
xmlns:local="clr-namespace:Course"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar"
Title="Home">
NavigationDirection="Horizontal"
AllowViewNavigation="False"
SelectionChanged="OnSelectionChangedAsync"
BackgroundColor="AliceBlue">
Event handler:
private async void OnSelectionChangedAsync(object sender, CalendarSelectionChangedEventArgs e)
{
var selectedDate = e.NewValue;
if (selectedDate != null)
{
bool result = await DisplayAlert("Add a workout", "Do you want to add a workout for this day?", "Yes", "No");
if (result)
{
Navigation.PushAsync(new CreateProgramPage(selectedDate.ToString()));
Calendar.SelectedDate = null;
}
else
{
Calendar.SelectedDate = null;
}
}
}
P.S. When I commented out the code associated with the calendar, the program started working.
The program also works fine in debug mode, but an exception appears in release mode
Hi Daniil,
As per the shared code snippet, we have checked the mentioned exception “Runtime exception occurred in the Maui Calendar” with the simple sample. There is no exception occurred from our end. We have attached the tested sample and video for the same. Please find the sample and video from the attached link.
Tested details:
Ensured with navigation page
Ensured with calendar page (Swipe to prev and next views)
Ensured with debug and release mode
Please check the sample and let us know still if you are facing same issue, If not please modify the sample based on your scenario and revert us more details. It would be helpful for us to analyze and provide you a solution at the earliest.
Regards,
Indumathi R
Attachment: MauiCalendar_c724867e.zip
You are right, your project has started, there is an error in my project, it may be incorrectly configured, or some component prevents the program from starting. I will look for the reason. Thank you for your help!
Hi Daniil,
Thanks for the update. Please let us know if you have any further queries on this. We are happy to help.
Regards,
Indumathi R