简体   繁体   English

Xamarin.Forms错误安装包

[英]Xamarin.Forms error install package

Package installer I get this error, gave this error in other packages 软件包安装程序我收到此错误,在其他软件包中给出了此错误

Error Could not install package 'Xamarin.GooglePlayServices.Ads 60.1142.0'. 错误无法安装软件包“ Xamarin.GooglePlayServices.Ads 60.1142.0”。 You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework. 您正在尝试将此软件包安装到以'.NETPortable,Version = v4.5,Profile = Profile259'为目标的项目中,但是该软件包不包含任何与该框架兼容的程序集引用或内容文件。 For more information, contact the package author. 有关更多信息,请与软件包作者联系。

You need to install this package into your Android project, not your Portable Class Library. 您需要将此包安装到Android项目中,而不是可移植类库中。 It is a Android-only library that cannot work cross-platform. 这是一个仅限Android的库,无法跨平台工作。 As you can see on the project's GitHub page: 正如您在项目的GitHub页面上看到的:

Xamarin creates and maintains Xamarin.Android bindings for the Google Play Services Client Library Xamarin为Google Play服务客户端库创建并维护Xamarin.Android绑定

The library is not a C# library, but it rather contains bindings to native Java-based libraries and hence compatible only with Android. 该库不是C#库,而是包含对基于本机Java的库的绑定,因此仅与Android兼容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM