gpt4 book ai didi

xamarin - 缺少 xamarin.googleplayservices 引用

转载 作者:行者123 更新时间:2023-12-05 06:36:24 26 4
gpt4 key购买 nike

我正在尝试在我的 xamarin 表单应用程序上使用谷歌地图。我安装了 Google.forms.maps。通过该安装,我得到了以下软件包:

  <package id="Xamarin.GooglePlayServices.Base" version="42.1021.1"    targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Basement" version="42.1021.1" targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Maps" version="42.1021.1" targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Tasks" version="42.1021.1" targetFramework="monoandroid71" />

一旦我开始运行应用程序,这些 dll 就会从 android 项目引用中消失,我得到错误

Severity    Code    Description Project File    Line    Suppression State
Error Did not find reference matching RestoreAssemblyResources AssemblyName metadata 'Xamarin.GooglePlayServices.Tasks' app1.Android

Did not find reference matching RestoreAssemblyResources AssemblyName metadata 'Xamarin.GooglePlayServices.Base' app1.Android
Did not find reference matching RestoreAssemblyResources AssemblyName metadata 'Xamarin.GooglePlayServices.Maps' app1.Android
Did not find reference matching RestoreAssemblyResources AssemblyName metadata 'Xamarin.GooglePlayServices.Basemant' app1.Android

我用谷歌搜索了这个错误,并尝试使用 nuget 单独添加这些包,所以我这样做了

Install-Package Xamarin.GooglePlayServices.Base -Version 60.1142.0 

我收到一个错误提示

Install-Package : Could not install package 'Xamarin.GooglePlayServices.Base 60.1142.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.1', but the package does not contain any 

与该框架兼容的程序集引用或内容文件。有关详细信息,请联系软件包作者。

所以我尝试这样做:

Install-Package Xamarin.GooglePlayServices.Base -Version 29.0.0.1 

我遇到了与 nuget 包版本 60.1142.0 相同的错误

我使用的是 Visual Studio 2017 企业版。

在这方面的任何帮助将不胜感激。以下是 android 项目的目标:

enter image description here

enter image description here

我的目标框架是这样的:

enter image description here

而sdk图片是这样的:

enter image description here

下面是visual studio Help->about窗口。

enter image description here

最佳答案

一般消息:

Could not install package 'Xamarin.XXXXXXX'. You are trying to install this package into a project that targets 'MonoAndroid,Version=vX.X'

具体消息:

Could not install package 'Xamarin.GooglePlayServices.Base 60.1142.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.1'

将您的 Xamarin.Android 项目更改为至少 MonoAndroid 8.0 作为 Xamarin.GooglePlayServices.Base v60.1142.0 依赖于 8.0

enter image description here

Nuget:Xamarin.GooglePlayServices.Base/60.1142.0

依赖

enter image description here

关于xamarin - 缺少 xamarin.googleplayservices 引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49138171/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com