0

我将我的 Xamarin.Android 项目迁移到目标 sdk 27​​,然后将所有 nuget 包更新到新版本。在构建时,我收到了一些我无法修复的错误:

C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values\values.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Info'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values-v21\values-v21.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Info'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values-v24\values-v24.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Info'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values\values.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values-v21\values-v21.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values-v24\values-v24.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values\values.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Time'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values-v21\values-v21.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Time'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values-v24\values-v24.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Time'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values\values.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Title'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values-v21\values-v21.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Title'.
C:\Users\...path...\Droid\obj\DebugTest\MonoAndroid81\lp\34\jl\res\values-v24\values-v24.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Compat.Notification.Title'.

我的 nuget 依赖项:

<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AWSSDK.CognitoIdentity" version="3.3.2.33" targetFramework="monoandroid90" />
<package id="AWSSDK.Core" version="3.3.25.2" targetFramework="monoandroid90" />
<package id="AWSSDK.SecurityToken" version="3.3.4.14" targetFramework="monoandroid90" />
<package id="AWSSDK.SimpleNotificationService" version="3.3.1.10" targetFramework="monoandroid90" />
<package id="Fabric.Core" version="1.1.0" targetFramework="monoandroid51" />
<package id="Fabric.Crashlytics" version="1.1.0" targetFramework="monoandroid51" />
<package id="Genetics" version="1.1.0.50" targetFramework="MonoAndroid51" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="MonoAndroid51" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="MonoAndroid51" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="MonoAndroid51" />
<package id="modernhttpclient" version="2.4.2" targetFramework="MonoAndroid51" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="monoandroid90" />
<package id="PCLCrypto" version="2.0.147" targetFramework="monoandroid90" />
<package id="PCLStorage" version="1.0.2" targetFramework="MonoAndroid51" />
<package id="PInvoke.BCrypt" version="0.5.155" targetFramework="monoandroid90" />
<package id="PInvoke.Kernel32" version="0.5.155" targetFramework="monoandroid90" />
<package id="PInvoke.NCrypt" version="0.5.155" targetFramework="monoandroid90" />
<package id="PInvoke.Windows.Core" version="0.5.155" targetFramework="monoandroid90" />
<package id="Validation" version="2.4.18" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Arch.Core.Common" version="1.0.0.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Arch.Lifecycle.Common" version="1.0.3.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.0.3.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Annotations" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Compat" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Core.UI" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Core.Utils" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Design" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Fragment" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Media.Compat" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Transition" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.v4" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.v7.CardView" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="27.0.2.1" targetFramework="monoandroid90" />
<package id="Xamarin.Build.Download" version="0.4.11" targetFramework="monoandroid90" />
<package id="Xamarin.Firebase.Analytics" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.Firebase.Analytics.Impl" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.Firebase.Common" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.Firebase.Iid" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.GooglePlayServices.Analytics" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.GooglePlayServices.Analytics.Impl" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.GooglePlayServices.Base" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.GooglePlayServices.Basement" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.GooglePlayServices.TagManager.V4.Impl" version="60.1142.1" targetFramework="monoandroid90" />
<package id="Xamarin.GooglePlayServices.Tasks" version="60.1142.1" targetFramework="monoandroid90" />
</packages>

任何解决方案?我不知道如何解决它。我在 windows 和 mac 上尝试了干净的 locals、obj、bin dirs 并重建,没有任何效果。我在代码中没有使用任何兼容通知样式。

最小 SDK - 15 目标 SDK - 27

Xamarin.Android SDK 9.0.0.1.9 Visual Studio 2017

提前致谢

4

0 回答 0