Xamarin.Forms目标框架(Kitkat)问题 - c#

我有一个Xamarin Forms中的项目,该项目以Target Framework作为Oreo即8.0开始。但是我的应用程序在低端设备上经常崩溃,因此我决定降级为Android 4.4作为目标框架。我将所有的nuget软件包降级为合适的版本。但是我仍然收到以下错误:

max res 19, skipping values-v21 "max res 19, skipping values-v21" in aapt.exe           
max res 19, skipping values-ldltr-v21 "max res 19, skipping values-ldltr-v21" in aapt.exe           
max res 19, skipping drawable-v21 "max res 19, skipping drawable-v21" in aapt.exe           
max res 19, skipping values-v23 "max res 19, skipping values-v23" in aapt.exe   
max res 19, skipping values-v22 "max res 19, skipping values-v22" in aapt.exe   
max res 19, skipping drawable-v23 "max res 19, skipping drawable-v23" in aapt.exe
max res 19, skipping anim-v21 "max res 19, skipping anim-v21" in aapt.exe           
max res 19, skipping values-v23 "max res 19, skipping values-v23" in aapt.exe   
max res 19, skipping color-v23 "max res 19, skipping color-v23" in aapt.exe 
No resource found that matches the given name: attr 'android:elevation' in values.xml   

有人可以帮帮我吗?

参考方案

Xamarin.Forms要求是您必须使用最新的Android编译和目标API级别...。

此外,Android项目的目标/编译版本必须设置为“使用最新安装的平台”。但是,最低版本可以设置为API 15,因此您可以继续支持使用Android 4.0.3和更高版本的设备。这些值在项目选项中设置:

回复:https://docs.microsoft.com/en-us/xamarin/xamarin-forms/get-started/installation?tabs=vswin#android

Xamarin Forms按钮单击事件在运行时崩溃 - c#

我正在Xamarin中针对Windows,iOS和Android编辑一个应用程序。在可移植项目中,当编辑xaml文件时,我添加了以下按钮:<Button x:Name="Marker_Detection" Text="Marker Detection" Grid.Row="0" Grid.Co…

Java System.currentTimeMillis()问题 - java

因此,在我的java类中,我们进行了一项作业分配,以使用System.currentTimeMillis显示两次单击之间的时间。我已经尝试了很多,但是没有用。这是我的代码。 1 /* Matthew Caldwell 2 * September 21, 2011 3 * Homework #4: Problem 5.8.1 pg. 149 4 * Progr…

如何自定义Xamarin形式的滑块? - java

我要自定义滑块,使其看起来如下图所示:我在.xaml文件中的代码:<Slider MaximumTrackColor="Black" MinimumTrackColor="Black" HeightRequest="50" ThumbColor="Black" ThumbI…

Java到C#的转换,以在Xamarin中制作androidstudio应用 - java

                        下面的代码行在Java(AndroidStudio)中完美运行,但是在c#(Xamarin)中返回错误。不知道出了什么问题。我是C#的新手private final int NONE = -1, TOUCH_TOP_FIRST = 0, TOUCH_TOP_SECOND = 1, TOUCH_BOT_THIRD…

当应用加载但未在前台运行时,如何使我的应用发出通知? - c#

我有一个有时会使用的应用程序。我睡觉之前一定把它留在后台。醒来时,我在屏幕上看到此通知。有人对我如何在XF应用程序中显示这样的通知有任何建议吗?另外,这些通知还会出现在Android上吗?我从未在Android手机上看到它们,但这可能是因为我使用的次数少了。 参考方案 我们可以使用Shiny.Notifications NuGet Package在Xamar…