简体   繁体   English

Xamarin表单(Visual Studio) - 更新到Xamarin和jdk 1.8后加载项目时出错

[英]Xamarin forms (Visual Studio) - Error while loading project after updating to Xamarin and jdk 1.8

After updating Xamarin for Visual Studio to v'4.3.0.789' and jdk 1.8. 将Xamarin for Visual Studio更新为v'4.3.0.789'和jdk 1.8。 I am getting this error. 我收到了这个错误。 I have tried all possible way but unable to resolve. 我已经尝试了所有可能的方法,但无法解决。

Severity Code Description Project File Line Suppression State Error An error occurred trying to install required android components on Project 'CrossPlatformApp2.Android'. 严重性代码说明项目文件行抑制状态错误尝试在Project'CrossPlatformApp2.Android'上安装所需的Android组件时发生错误。 Project 'CrossPlatformApp2.Android' requires the following components installed on your machine: Xamarin.Android.Support.v7.AppCompat JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/appcompat-v7/23.3.0/appcompat-v7-23.3.0.aar-23.3.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/appcompat-v7/23.3.0/appcompat-v7-23.3.0.aar-23.3.0.0 Xamarin.Android.Support.v7.MediaRouter JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/mediarouter-v7/23.3.0/mediarouter-v7-23.3.0.aar-23.3.0.0 JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/mediarouter-v7/23.3.0/mediarouter-v7-23.3.0.aar-23.3.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2r 项目“CrossPlatformApp2.Android”需要在您的计算机上安装以下组件:Xamarin.Android.Support.v7.AppCompat JavaLibraryReference: https ://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/ android / support / appcompat-v7 / 23.3.0 / appcompat-v7-23.3.0.aar-23.3.0.0 AndroidResources: https ://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com /android/support/appcompat-v7/23.3.0/appcompat-v7-23.3.0.aar-23.3.0.0 Xamarin.Android.Support.v7.MediaRouter JavaLibraryReference: https ://dl-ssl.google.com/android /repository/android_m2repository_r29.zip-m2repository/com/android/support/mediarouter-v7/23.3.0/mediarouter-v7-23.3.0.aar-23.3.0.0 JavaLibraryReference: https ://dl-ssl.google.com/ android / repository / android_m2repository_r29.zip-m2repository / com / android / support / mediarouter-v7 / 23.3.0 / mediarouter-v7-23.3.0.aar-23.3.0.0 AndroidResources: https ://dl-ssl.google.com /android/repository/android_m2repository_r29.zip-m2r epository/com/android/support/mediarouter-v7/23.3.0/mediarouter-v7-23.3.0.aar-23.3.0.0 epository / COM /安卓/支持/ mediarouter-V7 / 23.3.0 / mediarouter-v7-23.3.0.aar-23.3.0.0

Please double-click here to install it. 请双击此处进行安装。

Intallation Errors: XA5209 Unzipping failed. Intallation错误:XA5209解压缩失败。 Please download ' https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip:m2repository/com/android/support/appcompat-v7/23.3.0/appcompat-v7-23.3.0.aar ' and extract it to the 'C:\\Users\\prashantvarma\\AppData\\Local\\Xamarin\\Xamarin.Android.Support.v7.AppCompat\\23.3.0.0\\embedded' directory XA5209 Reason: The process cannot access the file 'C:\\Users\\prashantvarma\\AppData\\Local\\Xamarin\\Xamarin.Android.Support.v7.AppCompat\\23.3.0.0\\embedded\\res\\drawable-xxhdpi-v4' because it is being used by another process. 请下载“ https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip:m2repository/com/android/support/appcompat-v7/23.3.0/appcompat-v7-23.3.0.aar ”并将其解压缩到'C:\\ Users \\ prashantvarma \\ AppData \\ Local \\ Xamarin \\ Xamarin.Android.Support.v7.AppCompat \\ 23.3.0.0 \\ embedded'目录XA5209原因:进程无法访问文件'C:\\ Users \\ prashantvarma \\ AppData \\ Local \\ Xamarin \\ Xamarin.Android.Support.v7.AppCompat \\ 23.3.0.0 \\ embedded \\ res \\ drawable-xxhdpi-v4'因为它正被另一个进程使用。 XA5207 Please install package: 'Xamarin.Android.Support.v7.AppCompat' available in SDK installer. XA5207请安装软件包:SDK安装程序中提供的“Xamarin.Android.Support.v7.AppCompat”。 Java library file 'C:\\Program Files (x86)\\Android\\android-sdk\\extras\\android\\classes.jar' doesn't exist. Java库文件'C:\\ Program Files(x86)\\ Android \\ android-sdk \\ extras \\ android \\ classes.jar'不存在。 XA5207 Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. XA5207请安装包:SDK安装程序中提供的'Xamarin.Android.Support.v7.MediaRouter'。 Java library file 'C:\\Program Files (x86)\\Android\\android-sdk\\extras\\android\\classes.jar' doesn't exist. Java库文件'C:\\ Program Files(x86)\\ Android \\ android-sdk \\ extras \\ android \\ classes.jar'不存在。 XA5207 Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. XA5207请安装包:SDK安装程序中提供的'Xamarin.Android.Support.v7.MediaRouter'。 Java library file 'C:\\Program Files (x86)\\Android\\android-sdk\\extras\\android\\libs/internal_impl-23.3.0.jar' doesn't exist. Java库文件'C:\\ Program Files(x86)\\ Android \\ android-sdk \\ extras \\ android \\ libs / internal_impl-23.3.0.jar'不存在。 0 0

However, my old application (created in old Xamarin version) is able to run. 但是,我的旧应用程序(在旧的Xamarin版本中创建)能够运行。

I used to have this error as well. 我以前也有这个错误。 Try the underlying fix I wrote and use myself. 尝试我写的底层修复并使用自己。


If you get multiple errors when trying to build the project (eg ~14 errors) which state that the unzipping of packages failed and that you will have to do it manually, then do the following: 如果在尝试构建项目时遇到多个错误(例如~14个错误),这些错误表明解压缩包失败并且您必须手动执行,请执行以下操作:

  • Go to the path stated in the error 转到错误中指定的路径
  • Go a folder (or 2) higher until you see a folder called "zips". 转到更高的文件夹(或2),直到看到名为“zips”的文件夹。
  • Delete all the content in that (“zips”) folder and retry building. 删除该(“zips”)文件夹中的所有内容,然后重试构建。

The build will take a bit longer, so have some patience. 构建需要更长的时间,所以请耐心等待。 This error is caused by a corrupted zip of a needed package in the build, mostly caused by aborting a build. 此错误是由构建中所需包的损坏拉链引起的,主要是由于中止构建而导致的。 Deleting the files will force the compiler to redownload the packages which will fix the corrupted zips issue. 删除文件将强制编译器重新下载将修复损坏的拉链问题的软件包。

好的,我只需卸载Xamarin并再次安装Visual Studio Professional 2015安装程序中显示的旧版本(v4.2.1)即可解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 Visual Studio 2017 更新到版本 15.5.2 后出现 Xamarin 错误 - Xamarin error after updating Visual Studio 2017 to version 15.5.2 Xamarin为Visual Studio形成Intellisense - Xamarin Forms Intellisense for Visual Studio 视觉工作室xamarin形成mvvm - visual studio xamarin forms mvvm 无法从Visual Studio 2015创建xamarin.forms项目 - can not create xamarin.forms project from visual studio 2015 创建Xamarin.Forms跨平台应用程序时,“此项目需要加载Visual Studio更新”错误 - “This project requires a Visual Studio update to load” error when creating a Xamarin.Forms Cross-Platform Application 创建Xamarin.Forms跨平台应用程序时出现“此项目需要Visual Studio更新才能加载”错误 - “This project requires a Visual Studio update to load” error when creating a Xamarin.Forms Cross-Platform Application Xamarin表单图像加载错误 - Xamarin Forms Image Loading Error 使用Visual Studio的Xamarin.forms停止显示错误消息 - Xamarin.forms with Visual Studio stopped showing error messages Android 模拟器在 Xamarin 表单 Visual Studio 中显示错误 - Android Emulator showing a error in Xamarin forms Visual Studio 在Visual Studio上运行Xamarin Forms iOS的GetBuiltProjectOutputRecursive错误 - GetBuiltProjectOutputRecursive error running Xamarin Forms iOS on Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM