简体   繁体   中英

Brand new Xamarin.Forms project: The file “obj\Debug\android\bin\packaged_resources” does not exist

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

Everything works great in Xamarin Studio on Mac.

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

How can I fix this?

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

Open up the Android SDK Tools. Here is where it is if you are using Visual Studio. 在此处输入图片说明

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.

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

Then near the bottom I normally have at least

  • Android Support Library Google
  • USB Driver

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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