Xamarin.Forms: Android project Build Error - Missing Files inside AppDataLocalXamarin Folders(Xamarin.Forms:Android 项目构建错误 - AppDataLocalXamarin 文件夹中缺少文件)
问题描述
我正在尝试 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.拉链并将其放到C:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.0.1.3目录.App2.Droid 原因:一个或多个错误.App2.Droid
请安装包:'Xamarin.Android.Support.Design' 可用SDK 安装程序.Java 库文件C:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.0.1.3embeddedclasses.jar不存在.App2.Droid 下载失败.请下载https://dl-ssl.google.com/android/repository/android_m2repository_r22.拉链并将其放到C:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.0.1.3目录.App2.Droid 原因:一个或多个错误.App2.Droid
请安装包:'Xamarin.Android.Support.Design' 可用SDK 安装程序.安卓资源目录C:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.0.1.3embedded./不存在.App2.Droid
Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.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:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.0.1.3embeddedclasses.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:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.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:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.0.1.3embedded./ doesn't exist. App2.Droid
我已经尝试过:
- 下载 android_m2repository_r22.zip 文件并将其放在 C:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.0.1.3 文件夹中
- 下载文件并解压到文件夹中
- 删除 C:Userspedro.costaAppDataLocalXamarinAndroid.Support.Design23.0.1.3 文件夹并重新编译项目
- 删除 C:Userspedro.costaAppDataLocalXamarinzips 文件夹并重新编译项目.
- 更新 Xamarin.Android.Support.* nuget 包,但是当我尝试它时,我也会遇到这些构建错误.
我做了很多研究,似乎 Android.Support.* 文件夹中应该有文件,并且应该在构建 android 解决方案时下载这些文件,但对我来说并没有发生.
I've done a lot of research and it seems that the Android.Support.* folders should have 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.
就我而言,问题是代理问题.当我将环境设置为在没有代理的情况下访问 Internet 时,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 项目构建错误 - AppDataLocalXamarin 文件夹中缺少文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Xamarin.Forms:Android 项目构建错误 - AppDataLocalXamarin 文件夹中缺少文件
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 输入按键事件处理程序 2022-01-01