Xamarin-如何更新Mono.Android版本以解决依赖关系? [英] Xamarin - How to update Mono.Android version to resolve dependencies?

查看:373
本文介绍了Xamarin-如何更新Mono.Android版本以解决依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装一个nuget软件包(Xamarin.Firebase.Firestore),该软件包需要更新版本的Xamarin.GooglePlayServices.Basement(60.1142.0,我有42.1021.1),这又需要我更新xamarin.android.support软件包.当我尝试更新这些时,出现此错误 软件包Xamarin.Android.Support.Design 27.0.2与monoandroid80(MonoAndroid,Version = v8.0)不兼容.软件包Xamarin.Android.Support.Design 27.0.2支持:monoandroid81(MonoAndroid,Version = v8.1) "

I'm trying to install a nuget package (Xamarin.Firebase.Firestore) which requires a newer version of Xamarin.GooglePlayServices.Basement (60.1142.0, I have 42.1021.1), which in turn requires me to update the xamarin.android.support packages. When I try to update those, I get this error "Package Xamarin.Android.Support.Design 27.0.2 is not compatible with monoandroid80 (MonoAndroid,Version=v8.0). Package Xamarin.Android.Support.Design 27.0.2 supports: monoandroid81 (MonoAndroid,Version=v8.1)"

我尝试将目标android版本更改为8.1,还更新了SDK和构建工具.我正在运行Visual Studio 15.6.1.作为最后的努力,我尝试删除了Mono.Android V8.0引用,然后向V8.1添加了新引用,但是每当这样做时,Visual Studio最终都会添加带有指向V8.0的路径的引用,即使我添加的参考资料显然指向V8.1.

I've tried changing my target android version to 8.1, I've also updated my SDK as well as the build tools. I'm running Visual Studio 15.6.1. As a last ditch effort, I tried deleting the Mono.Android V8.0 reference and then adding a new reference to V8.1, but whenever I do so, Visual studio just ends up adding the reference with the path pointing to V8.0, even though the reference I added was clearly pointing to V8.1.

有人知道如何解决此问题吗?

Anyone has a clue how to resolve this issue?

推荐答案

试图将我的目标android版本更改为8.1

tried changing my target android version to 8.1

您需要更改用于编译android应用程序的Target Framework,而不是Target Android version(但是您可以将这两个设置为相同,请阅读下面的理解Android API级别链接.

You need to change the Target Framework that is used to compile your android application, not the Target Android version (but assumably you would set these two to the same, read the Understanding Android API Levels link below.

目标框架–指定在构建应用程序时要使用的框架. Xamarin.Android在编译时使用此API级别.

最低Android版本–指定您希望应用程序支持的最旧的Android版本. Android会在运行时使用此API级别.

Minimum Android Version – Specifies the oldest Android version that you want your app to support. This API level is used at run time by Android.

目标Android版本–指定要在其上运行您的应用的Android版本. Android会在运行时使用此API级别.

Target Android Version – Specifies the version of Android that your app is intended to run on. This API level is used at run time by Android.

  • 了解Android API级别
    • Understanding Android API Levels
    • 清单条目:

      用于Windows的Visual Studio:

      Visual Studio for Windows:

      Visual Studio for Mac:

      Visual Studio for Mac:

      这篇关于Xamarin-如何更新Mono.Android版本以解决依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆