Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Please install package: 'Android Support Library'

I am coding a Xamarin application and these are the errors that I am getting when building my application:

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5206: Please install package: 'Android Support Library' available in SDK installer. Android resource directory C:\Users\Simon\Documents\Xamarin\SimpleOnePageViewPager\SimpleOnePageViewPager\Components\googleplayservicesgingerbread-16.0.0.1\lib\android\19.1.0\content\support/v7/appcompat doesn't exist. (XA5206) (SimpleOnePageViewPager)
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file C:\Users\Simon\Documents\Xamarin\SimpleOnePageViewPager\SimpleOnePageViewPager\Components\googleplayservicesgingerbread-16.0.0.1\lib\android\19.1.0\content\support/v7/appcompat/libs/android-support-v7-appcompat.jar doesn't exist. (XA5207) (SimpleOnePageViewPager)
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5206: Please install package: 'Android Support Library' available in SDK installer. Android resource directory C:\Users\Simon\Documents\Xamarin\SimpleOnePageViewPager\SimpleOnePageViewPager\Components\googleplayservicesgingerbread-16.0.0.1\lib\android\19.1.0\content\support/v7/mediarouter doesn't exist. (XA5206) (SimpleOnePageViewPager)
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file C:\Users\Simon\Documents\Xamarin\SimpleOnePageViewPager\SimpleOnePageViewPager\Components\googleplayservicesgingerbread-16.0.0.1\lib\android\19.1.0\content\support/v7/mediarouter/libs/android-support-v7-mediarouter.jar doesn't exist. (XA5207) (SimpleOnePageViewPager)

I have added the Android Support Library v4 as a component and in the Android SDK Manager I seem to have everything installed correctly.

Can I please have some help to get my code building successfully?

Thanks in advance

EDIT

I have added the Android Support Library v7 AppCompat as a component and am now getting these two errors:

Error XA5206: Please install package: 'Android Support Library' available in SDK installer. Android resource directory C:\Users\Simon\Documents\Xamarin\SimpleOnePageViewPager\SimpleOnePageViewPager\Components\googleplayservicesgingerbread-16.0.0.1\lib\android\19.1.0\content\support/v7/mediarouter doesn't exist. (XA5206) (SimpleOnePageViewPager)
Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file C:\Users\Simon\Documents\Xamarin\SimpleOnePageViewPager\SimpleOnePageViewPager\Components\googleplayservicesgingerbread-16.0.0.1\lib\android\19.1.0\content\support/v7/mediarouter/libs/android-support-v7-mediarouter.jar doesn't exist. (XA5207) (SimpleOnePageViewPager)
like image 478
user3548779 Avatar asked May 21 '14 07:05

user3548779


People also ask

How do I install support library?

Downloading the Support Libraries Start the android SDK Manager. In the SDK Manager window, scroll to the end of the Packages list, find the Extras folder. Select the Android Support Library item. Click the Install packages button.

Which v7 support libraries are used for modifying UI settings?

v7 Preference Support Library The preference package provides APIs to support adding preference objects, such as CheckBoxPreference and ListPreference , for users to modify UI settings. The v7 Preference library adds support for interfaces, such as Preference. OnPreferenceChangeListener and Preference.


Video Answer


4 Answers

in case your "embedded" folder is missing, just downloading and extracting the android_m2repository_r10.zip does not solve the issue.

I deleted the entire C:\Users\\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3 folder and then rebuild as described here: [Error after updating the Android.Support Library v7 AppCompat to the 21.0.3 version

like image 55
checkmate711 Avatar answered Oct 21 '22 16:10

checkmate711


I solved all of the 'Please install Android Support Library' errors, although I'm not sure which step exactly solved it. However, this is what I did in case someone has the same trouble as I did:

  • Download "https://dl-ssl.google.com/android/repository/android_m2repository_r10.zip " and paste it in "C:\Users\YourUserName\AppData\Local\Xamarin\Android.Support.v4\21.0.3\". For mac users change the path pre-Xamarin to \Users\YourUserName\ .local\share\Xamarin (Overwrite as needed, but create backup just in case)
  • Extract the contents of the android_m2repository_r10.zip archive into {...}\Android.Support.v4\21.0.3\content folder (create content folder if it doesn't exist, overwrite as needed and take same precautions as above)
  • Repeat the steps above but this time for the {...}\Android.Support.v4\22.2.0 folder instead of the 21.0.3
  • Make sure you have your packages updated to the latest version by right clicking on the Package folder of your solution and clicking Update (At least on Xamarin Studio).
  • Make sure you also have the latest version of Android Support Library on the Android SDK Manager
  • In case everything fails, try the AppCompat Android component from Xamarin (your milage may vary with the last one)
like image 20
sgarcia.dev Avatar answered Oct 21 '22 16:10

sgarcia.dev


I was facing same problem and i followed following link and it is working like a charm.

https://forums.xamarin.com/discussion/56627/xamarin-android-support-v7-cardview-error-depite-being-installed

like image 42
Ashish-BeJovial Avatar answered Oct 21 '22 16:10

Ashish-BeJovial


Just suppress the zip in Xamarin\zips{zip} and rebuild your solution .

like image 25
valerian Havaux Avatar answered Oct 21 '22 16:10

valerian Havaux