Xamarin.Forms:Android项目生成错误 - AppData\Local\Xamarin文件夹中的文件丢失 [英] Xamarin.Forms: Android project Build Error - Missing Files inside AppData\Local\Xamarin Folders

查看:613
本文介绍了Xamarin.Forms:Android项目生成错误 - AppData\Local\Xamarin文件夹中的文件丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想的Xamarin.Forms。
我创建了一个名为App2的解决方案。在Visual Studio自动创建了以下项目:

I'm trying the Xamarin.Forms. I created a Solution named "App2". The Visual Studio automatically created the following projects:


  • App2的(便携式)

  • App2.Droid

  • App2.iOS

当我尝试编译Android项目(App2.Droid)我收到以下错误:

When I try to compile the Android Project (App2.Droid), I get the following errors:

下载失败。请下载
https://dl-ssl.google.com/android /repository/android_m2repository_r22.zip
和它放到
C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\\ \\23.0.1.3
目录。 App2.Droid原因:一个或多个错误。 App2.Droid结果
请安装包:Xamarin.Android.Support.Design提供
SDK安装程序。 Java库文件
C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded\classes.jar
不存在。 App2.Droid下载失败。请下载
https://dl-ssl.google.com/android /repository/android_m2repository_r22.zip
和它放到
C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\\ \\23.0.1.3
目录。 App2.Droid原因:一个或多个错误。 App2.Droid结果
请安装包:Xamarin.Android.Support.Design提供
SDK安装程序。 Android的资源目录
:C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded /
不存在。 App2.Droid

Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 directory. App2.Droid Reason: One or more errors. App2.Droid
Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Java library file C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded\classes.jar doesn't exist. App2.Droid Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 directory. App2.Droid Reason: One or more errors. App2.Droid
Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Android resource directory C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded./ doesn't exist. App2.Droid

我已经试过:


  • 下载android_m2repository_r22.zip文件,并把它放在C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3文件夹

  • 下载文件并解压到文件夹

  • 删除C:\Users\pedro.costa\AppData\Local\Xamarin \Android.Support.Design\23.0.1.3文件夹,并重新编译项目

  • 删除C:\Users\pedro.costa\AppData\Local\Xamarin\拉链文件夹,并重新编译该项目。

  • 更新Xamarin.Android.Support。*的NuGet包,但是当我尝试它,我也得到这些构建错误。

  • Download the android_m2repository_r22.zip file and put it on the C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 folder
  • Download the file and extract it to the folder
  • Delete the C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 folder and recompile project
  • Delete the C:\Users\pedro.costa\AppData\Local\Xamarin\zips folder and recompile the project.
  • Update the Xamarin.Android.Support.* nuget packages, but when I try it, I also get those build errors.

我已经做了很多的研究,似乎Android.Support。*文件夹应该havy文件里面,而且这些文件应该被下载时, Android解决方案是建的,但它是不会发生我。

I've done a lot of research and it seems that the Android.Support.* folders should havy files inside it, and that those files should be downloaded when the android solution is built, but it is not happening for me.

推荐答案

我在其他的答案这个问题所看到的,由刚删除从Android.Support.Design文件夹中的所有内容时,Visual Studio会一旦该项目是重建重新下载。

I saw in other answers to this problem, that by just deleting all the content from the Android.Support.Design folder, Visual Studio would download it again once the project was rebuild.

在我的情况下的问题,是一个代理发行。当我把我的环境,而代理来访问互联网时,Visual Studio下载上重建必要的文件和文件夹。

The problem in my case, was a proxy issue. When I set my environment to access the internet without the proxy, Visual Studio download the necessary files and folders on the rebuild.

这篇关于Xamarin.Forms:Android项目生成错误 - AppData\Local\Xamarin文件夹中的文件丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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