首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在PCL Xamarin.Mobile项目中安装iOS

无法在PCL Xamarin.Mobile项目中安装iOS
EN

Stack Overflow用户
提问于 2016-11-25 11:27:50
回答 3查看 511关注 0票数 9

我试图通过Xamarin.Mobile在一个PCL iOS项目中安装NuGet,而我正在处理这个错误!

无法安装软件包‘xamstore-xamstore.移动0.7.1’。您正在尝试将此包安装到目标为“Xamarin.iOS,Version=v1.0”的项目中,但该包不包含任何与该框架兼容的程序集引用或内容文件。有关更多信息,请与包作者联系。

这是我的AppDelegate

代码语言:javascript
复制
// The UIApplicationDelegate for the application. This class is responsible for launching the 
// User Interface of the application, as well as listening (and optionally responding) to 
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
    //
    // This method is invoked when the application has loaded and is ready to run. In this 
    // method you should instantiate the window, load the UI into it and then make the window
    // visible.
    //
    // You have 17 seconds to return from this method, or iOS will terminate your application.
    //
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        global::Xamarin.Forms.Forms.Init();
        Xamarin.FormsMaps.Init();
        LoadApplication(new App());

        return base.FinishedLaunching(app, options);
    }
}

我的SDK版本是10.1。

Xamarin.Mobile在Android中运行得很好。

知道怎么解决这个问题吗?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2016-11-30 11:41:14

您可以尝试将Xamarin.Mobile包添加为组件,而不是添加带有NuGet的Xamarin.Mobile包。

右键单击Components文件夹:

在Xamarin组件窗口上搜索并选择Xamarin.Mobile

可能有用!

票数 2
EN

Stack Overflow用户

发布于 2016-11-25 12:21:07

使用Microsoft解决问题的方法。

清理你的解决方案,然后再重建一次。

票数 3
EN

Stack Overflow用户

发布于 2016-11-29 19:33:01

Xamarin.Mobile NuGet包与PCL不兼容,因此出现了错误。此DLL将安装到iOS/Android/Windows应用程序项目中。没有用于PCL的跨平台API。

您可以将它与共享库一起使用。或者,您需要在每个平台项目中工作。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40803991

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档