.NET MAUI getting error on Android

Bhuwan 616 Reputation points
2024-03-30T11:12:48.31+00:00

in .NET MAUI getting below error when select picker on Android and on iOS it's working fine

Android.Views.InflateException: 'Binary XML file line #23 in com.test.dev:layout/mtrl_alert_select_dialog_item: Binary XML file line #23 in com.test.dev:layout/mtrl_alert_select_dialog_item: Error inflating class TextView'

error comes when select picker

<Grid ColumnDefinitions="Auto,*" Grid.Row="2" Grid.Column="1" ColumnSpacing="10" IsVisible="{Binding IsItemFrequency}" Margin="0,0,0,10" HorizontalOptions="FillAndExpand">
    <Label Grid.Column="0" VerticalOptions="Center" Margin="0"
                Text="Deliver"
                FontSize="16"
                FontFamily="OpenSansRegular"
                HorizontalTextAlignment="Start" VerticalTextAlignment="Center" 
                TextColor="{StaticResource BodyTextColor}"/>
    <Border Grid.Column="1" Margin="0" Padding="0" HorizontalOptions="FillAndExpand"  Stroke="#707070" HeightRequest="41">
        <Border.StrokeShape>
            <RoundRectangle CornerRadius="10" StrokeThickness="1"/>
        </Border.StrokeShape>
        <Grid ColumnDefinitions="*,Auto,Auto" HorizontalOptions="FillAndExpand" BackgroundColor="Transparent" Padding="5,0">
            <Picker x:Name="pkItem" x:FieldModifier="public" Grid.Column="0" BackgroundColor="Transparent"
                                TextColor="{StaticResource BodyTextColor}" FontFamily="OpenSansRegular"
                                HorizontalOptions="FillAndExpand" FontSize="12" 
                                HorizontalTextAlignment="Start"
                                VerticalTextAlignment="Center"
                                ItemDisplayBinding="{Binding Text}"
                                ItemsSource="{Binding AutoItemLists}"  SelectedIndex="{Binding AutoItemSelectedIndex}" Unfocused="pkItem_Unfocused"/>
            <svg:SvgCachedImage CacheDuration="30" RetryCount="3" RetryDelay="250" IsEnabled="False" Grid.Column="2" WidthRequest="15" Source="icon_arrow_down" HorizontalOptions="EndAndExpand" Margin="0,0,5,0"/>
            <Grid.GestureRecognizers>
                <TapGestureRecognizer x:Name="GridItem" Tapped="GridItem_Tapped" NumberOfTapsRequired="1"/>
            </Grid.GestureRecognizers>
        </Grid>
    </Border>
</Grid>	
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,859 questions
{count} votes