xamarin.forms新建项目android编译错误

vs2015 update3 新建的xamarin.forms项目中的android项目编译错误。提示缺少android_m2repository_r22.zip,96659D653BDE0FAEDB818170891F2BB0.zip等类似错误。

xamarin.forms新建项目android编译错误xamarin.forms新建项目android编译错误
Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\classes.jar doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\libs/internal_impl-23.0.1.jar doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Android resource directory C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\./ doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.AppCompat\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v7.AppCompat' available in SDK installer. Java library file C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.AppCompat\23.0.1.3\embedded\classes.jar doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.AppCompat\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v7.AppCompat' available in SDK installer. Android resource directory C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.AppCompat\23.0.1.3\embedded\./ doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.CardView\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v7.CardView' available in SDK installer. Java library file C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.CardView\23.0.1.3\embedded\classes.jar doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.CardView\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v7.CardView' available in SDK installer. Android resource directory C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.CardView\23.0.1.3\embedded\./ doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3\embedded\classes.jar doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3\embedded\libs/internal_impl-23.0.1.jar doesn't exist. XamarinFormsExample.Droid

Error Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3 directory. XamarinFormsExample.Droid

Error Reason: One or more errors occurred. XamarinFormsExample.Droid

Error Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Android resource directory C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3\embedded\./ doesn't exist. XamarinFormsExample.Droid
View Code

解决办法

  1. 删除文件夹 C:\Users\your user\AppData\Local\Xamarin
  2. 新建文件夹C:\Users\your user\AppData\Local\Xamarin\zips
  3. 将下载的zip文件copy到zips文件夹,下载地址和文件夹名称关系可参考 http://www.cnblogs.com/qinjin/p/m2repository.html
  4. 清理解决方案,然后重新生成即可

参考

解决Xamarin Android墙的问题

http://*.com/questions/36616524/xamarin-support-package-error

http://forums.xamarin.com/discussion/61533/project-wont-build-xamarin-android-support

上一篇:简约而不简单:网站着陆页的设计(Landing Page Design)


下一篇:PAI-STUDIO通过Tensorflow处理MaxCompute表数据