[英]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个错误),这些错误表明解压缩包失败并且您必须手动执行,请执行以下操作:
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.