添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Below is the error output when I try to update the Xamarin.AndroidX.anything

Restoring packages for C:\Users\VenkatMinchala\Documents\Xamarin_workspace\DooapMain\DooapMain\DooapMobile\src\Dooap.Android\Dooap.Android.csproj...
NU1608: Detected package version outside of dependency constraint: Xamarin.Essentials 1.7.1 requires Xamarin.AndroidX.Browser (>= 1.3.0.5 && < 1.4.0) but version Xamarin.AndroidX.Browser 1.4.0 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2337 requires Xamarin.AndroidX.Lifecycle.LiveData (>= 2.3.1.1 && < 2.4.0) but version Xamarin.AndroidX.Lifecycle.LiveData 2.4.1 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2337 requires Xamarin.Google.Android.Material (>= 1.4.0.2 && < 1.5.0) but version Xamarin.Google.Android.Material 1.5.0.1 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2337 requires Xamarin.AndroidX.Browser (>= 1.3.0.6 && < 1.4.0) but version Xamarin.AndroidX.Browser 1.4.0 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2337 requires Xamarin.AndroidX.Core (>= 1.6.0.1 && < 1.7.0) but version Xamarin.AndroidX.Core 1.7.0 was resolved.
NU1202: Package Xamarin.AndroidX.AppCompat.AppCompatResources 1.4.1 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.AppCompat.AppCompatResources 1.4.1 supports:

  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Arch.Core.Common 2.1.0.13 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Arch.Core.Common 2.1.0.13 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Lifecycle.Common 2.4.1 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Lifecycle.Common 2.4.1 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Lifecycle.Runtime 2.4.1 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Lifecycle.Runtime 2.4.1 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Lifecycle.ViewModel 2.4.1 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Lifecycle.ViewModel 2.4.1 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Annotation 1.3.0.2 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Annotation 1.3.0.2 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.AsyncLayoutInflater 1.0.0.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.AsyncLayoutInflater 1.0.0.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Collection 1.2.0.2 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Collection 1.2.0.2 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Core 1.7.0 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Core 1.7.0 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Legacy.Support.Core.UI 1.0.0.13 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Legacy.Support.Core.UI 1.0.0.13 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Legacy.Support.Core.Utils 1.0.0.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Legacy.Support.Core.Utils 1.0.0.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.CursorAdapter 1.0.0.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.CursorAdapter 1.0.0.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Fragment 1.4.1 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Fragment 1.4.1 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Interpolator 1.0.0.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Interpolator 1.0.0.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Loader 1.1.0.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Loader 1.1.0.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Media 1.5.0 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Media 1.5.0 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Palette 1.0.0.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Palette 1.0.0.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.RecyclerView 1.2.1.5 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.RecyclerView 1.2.1.5 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.VectorDrawable 1.1.0.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.VectorDrawable 1.1.0.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.VersionedParcelable 1.1.1.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.VersionedParcelable 1.1.1.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Browser 1.4.0 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Browser 1.4.0 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.CardView 1.0.0.14 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.CardView 1.0.0.14 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.Google.Android.Material 1.5.0.1 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.Google.Android.Material 1.5.0.1 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.AppCompat 1.4.1 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.AppCompat 1.4.1 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Legacy.Support.V4 1.0.0.12 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Legacy.Support.V4 1.0.0.12 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.MediaRouter 1.2.6 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.MediaRouter 1.2.6 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    NU1202: Package Xamarin.AndroidX.Lifecycle.LiveData 2.4.1 is not compatible with monoandroid11.0 (MonoAndroid,Version=v11.0). Package Xamarin.AndroidX.Lifecycle.LiveData 2.4.1 supports:
  • monoandroid12.0 (MonoAndroid,Version=v12.0)
  • net6.0-android31.0 (.NETCoreApp,Version=v6.0)
    Package restore failed. Rolling back package changes for 'Dooap.Android'.
    Time Elapsed: 00:00:00.2979956
    ========== Finished ==========
  • Hello,

    You need to add MonoAndroid12.0+ reference to your android project.

    You can refer to this issue Announcement: Updated AndroidX packages require MonoAndroid12.0+ to get more details.

    Best Regards,

    Alec Liu.

    If the answer is the right solution, please click " Accept Answer " and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    I was actually using Visual Studio 2019 version 16.11.11
    Little unsure but I cannot able to add MonoAndroid12.0+ reference.
    Moreover, it looks like Visual Studio 2019 version 16.11 to support Android 12 has unfortunate fallout with API 31... Please find more details in the below link.
    https://learn.microsoft.com/en-us/xamarin/android/release-notes/12/12.0

    Reference to your link made me understand that it is better to Install a new Visual Studio 2022 version 17.1+
    Once installed and stable you will now have the V12.0 SDK available. Change the Target Framework to Android 12.0 in the Android project csproj file
    I see no issues.

    The reference link below will help you with VS 2022 and Android 12.2
    https://learn.microsoft.com/en-us/xamarin/android/release-notes/12/12.2

    With the above changes, MY ISSUE IS RESOLVED