【问题标题】:Update Xamarin.forms更新 Xamarin.forms
【发布时间】:2019-04-05 03:34:43
【问题描述】:

我将 xamarin.forms 升级到 2.3.4.247 版本后发生崩溃。这是我第一次升级我的 xamarin.forms。我不知道坠机事件。有人可以帮忙吗?谢谢

【问题讨论】:

  • 看起来,LoginScreen Xaml 文件有问题。您能分享您的登录屏幕 xaml 文件吗?
  • 我看到你的question,因为System.ArgumentException has been thrown an item with the same key already been added不能再玩了,你有什么新问题?
  • 关于“System.ArgumentException 已抛出一个已添加相同密钥的项目”它已经完成,但只是在我的设备 IOS 中运行,然后在设备 Android 中它不起作用。那怎么样?有人可以帮忙吗?

标签: xamarin xamarin.forms xamarin.android xamarin.ios


【解决方案1】:

您是否尝试过清理您的解决方案,然后重新构建它?你试过什么?

【讨论】:

  • 是的,我试过了..它在IOS设备上运行但在Android设备上仍然崩溃。
【解决方案2】:
<?xml version="1.0" encoding="UTF-8"?>
<custom:MasterPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="DutchWallet.LoadingScreen" xmlns:custom="clr-namespace:DutchWallet;assembly=DutchWallet" xmlns:i18n="clr-namespace:DutchWallet.Localization;assembly=DutchWallet">
    <custom:MasterPage.Content>
        <AbsoluteLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
            <Image AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" Source="Images/background" Aspect="AspectFill" />
            <Label x:Name="WelcomeToLabel" Text="{i18n:Translate LoadingScreen_WelcomeTo}" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0, 0.18, 1, .1" HorizontalTextAlignment="Center" LineBreakMode="WordWrap" FontFamily="Open Sans" FontAttributes="Bold" TextColor="White" FontSize="42" />
            <Label Text="{i18n:Translate LoadingScreen_DucthWallet}" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0, 0.28, 1, .1" HorizontalTextAlignment="Center" LineBreakMode="WordWrap" FontFamily="Open Sans" FontAttributes="Bold" TextColor="White" FontSize="42" />
            <Image AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0.50, 0.55, .5, .5" Source="Icons/logo" Aspect="AspectFit">
                <Image.AbsoluteLayout.LayoutBounds>
                    <OnPlatform x:TypeArguments="Rectangle" iOS="0.50, 0.55, .5, .5" Android="0.50, 0.55, .4, .5" />
                </Image.AbsoluteLayout.LayoutBounds>
            </Image>
            <Label x:Name="VersionLabel" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0, 0.75, 1, .1" HorizontalTextAlignment="Center" LineBreakMode="WordWrap" FontFamily="Open Sans" FontAttributes="Bold" TextColor="White" Text="Version x.x" FontSize="14" />
        </AbsoluteLayout>
    </custom:MasterPage.Content>
</custom:MasterPage>

也许这个 xaml 是什么意思?

【讨论】: