瑞雪年

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: :: 订阅 订阅 :: 管理 ::

安装完Xamarin后,编译Android项目时,你会发现好长时间进度都不动,当你取消编译后,会发现其实是出错了,就是因在Android项目在第一次编译时要去google网站上下一个andorid sdk包,墙内又连不上,就卡在那了,解决办法就是自已到国内的一些镜像网站上(如:http://mirrors.opencas.cn/android/)下一个,如:android_m2repository_r29.zip, 然后解压到任意目录下,用mklink建立链接到C:\Users\{username}\AppData\Local\Xamarin\Android.Support.v4\23.3.0.0目录下,名字叫content,如命今:

cd Android.Support.Animated.Vector.Drawable\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

cd Android.Support.Design\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

cd Android.Support.v4\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

cd Android.Support.v7.AppCompat\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

cd Android.Support.v7.CardView\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

cd Android.Support.v7.MediaRouter\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

cd Android.Support.v7.RecyclerView\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

cd Android.Support.Vector.Drawable\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

cd Android.Support.Animated.Vector.Drawable\23.3.0.0
rmdir content
mklink /j content ..\..\android_m2repository_r29
cd ..\..\

这样再回到VS中编译,就OK了。

 

posted on 2016-04-29 21:16  瑞雪年  阅读(2260)  评论(2编辑  收藏  举报