全新的Xamarin.Forms项目:文件"obj \ Debug \ android \ bin \ packaged_resources"不存在 [英] Brand new Xamarin.Forms project: The file "obj\Debug\android\bin\packaged_resources" does not exist

查看:77
本文介绍了全新的Xamarin.Forms项目:文件"obj \ Debug \ android \ bin \ packaged_resources"不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了Visual Studio 2017,并且正在尝试处理Xamarin.Forms项目.我克隆了现有的存储库,可以很好地构建和部署iOS应用,但是当我尝试构建Android应用时,它将引发以下错误:

I just installed Visual Studio 2017 and I'm trying to work on a Xamarin.Forms project. I cloned the existing repo and could build and deploy the iOS app just fine, but when I try to build the Android app it throws the following error:

Severity    Code    Description Project File    Line    Suppression State
Error       The file "obj\Debug\android\bin\packaged_resources" does not exist. [Solution Name].Android C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets    1794

在Mac上的Xamarin Studio中,一切都很好.

Everything works great in Xamarin Studio on Mac.

我在VS 2017中创建了一个干净的Xamarin.Forms项目,以隔离任何特定的解决方案问题,并得到完全相同的错误.

I created a clean Xamarin.Forms project in VS 2017 to isolate any particular solution issues and am getting the exact same error.

我该如何解决?

推荐答案

如果未正确安装正确的构建工具,通常会发生此问题.

This issue generally occurs when the correct Build Tools aren't correctly installed.

打开Android SDK工具.如果您使用的是Visual Studio,则在这里.

Open up the Android SDK Tools. Here is where it is if you are using Visual Studio.

确保您具有最新的SDK工具,Platform Toosl和构建工具.删除任何预览或旧的构建工具.我会使用Rev. 25的.修订版24.有一些问题,我将确保将其卸载.

Make sure you have the latest SDK Tools, Platform Toosl and Build Tools. Delete any preview or old build tools. I would use the Rev. 25 ones. Rev 24. had a few issues, I would make sure they are uninstalled.

然后确保您已下载了正确的SDK,以进行任何尝试的编译.例如. 7.1、7.0、6.0等.

Then make sure you have the correct SDK downloaded for whatever you are trying to compile for. E.g. 7.1, 7.0, 6.0 etc.

然后通常在底部附近至少有

Then near the bottom I normally have at least

  • Android支持库Google
  • USB驱动程序

安装后,关闭所有VS实例,然后重新启动.

After install, close all VS instances and start it up again.

这篇关于全新的Xamarin.Forms项目:文件"obj \ Debug \ android \ bin \ packaged_resources"不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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