问题
I'm trying to build a project using Navigation View that relies on Support v4 and v7 and Design, I already installed v23.0.1 and I also installed Android Support Repository v30 from SDK Manager which seems to have plenty of older version named folders, everything works perfectly in Android Studio, I use Navigation Drawer with no problem, but with Xamarin I get this error:
Error Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Android resource directory C:\Users\Cayl\AppData\Local\Xamarin\Android.Support.Design\22.2.0\embedded\./ doesn't exist.
And also this:
Error Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r15.zip and extract it to the C:\Users\Cayl\AppData\Local\Xamarin\Android.Support.Design\22.2.0\content directory.
I'm lost now, why can't Xamarin use the same Support Libraries that Android Studio uses, and why does it require it's own path? help.
回答1:
This is a known bug. You should be able to fix it by either following the instructions in the console:
Error Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r15.zipand extract it to the C:\Users\Cayl\AppData\Local\Xamarin\Android.Support.Design\22.2.0\content directory
Or by deleting the folder:
C:\Users\Cayl\AppData\Local\Xamarin\Android.Support.Design\22.2.0
回答2:
It seems to be a hard coded binding to release 29 of Android Support Repository and Xamarin.Android automatically attempts to download that with a huge rate of corruption.
More info can be found in
https://blog.lextudio.com/2016/05/android-support-repository-and-xamarin-android/
回答3:
Try deleting the C:/Users/User/AppData/Local/Xamarin folder, and then clean and rebuild the app.
回答4:
I have one solution for you: Please download https://dl-ssl.google.com/android/repository/android_m2repository_r15.zip and place it in the ~/.local/share/Xamarin/zips folder and rename the file to match one of the hashed zip file name.
You can also follow step from below link, this will help you. https://developer.xamarin.com/guides/android/troubleshooting/resolving-library-installation-errors/
来源:https://stackoverflow.com/questions/37126386/xamarin-support-libraries-version-confusion