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

谁说我不能喝 提交于 2019-12-11 03:33:48

问题


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?


回答1:


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. E.g. 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.



来源:https://stackoverflow.com/questions/43419089/brand-new-xamarin-forms-project-the-file-obj-debug-android-bin-packaged-resour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!