error: package android.support.v4.view does not exist

DaohanChongDaohanChong CNMember ✭✭
CarouselPageAdapter.java(33,33): Error:  error: package android.support.v4.view does not exist
    extends android.support.v4.view.PagerAdapter
 (DemoProject.Droid)

I've installed Android Support Library in my Android SDK Manager:
image

Answers

  • AbdulMuhayminArifAbdulMuhayminArif INUniversity ✭✭
    edited August 2015

    Check Whether Xamarin is updated (V3.11.836), Add Android SDK Build Tool, Clean your solution and try Rebuild.

    Also download https://dl-ssl.google.com/android/repository/android_m2repository_r10.zip and copy it into

    On Windows:

    C:\Users\%USERNAME%\AppData\Local\Xamarin\Android.Support.v4\21.0.3\

    On Mac:

    ~/.local/share/Xamarin/Android.Support.v4/21.0.3/android-support-v4.jar

    Exit Xamarin, Re Open, Clean Solution and try Rebuild

  • dillongraydillongray ZAMember ✭✭
    1. Restart your project.
    2. Double click your android project
    3. Make sure your target framework matches what api's are installed( Located under framework).
    4. Check for that too under Android Application. Check that the Min Android version and Target Android version are what you have installed using the SDK Manager.

    Happy Coding.

  • DavidKleckerDavidKlecker USMember ✭✭

    both of these solution do not work. Sorry. :( Anything else?

  • JPatel77JPatel77 ZAMember ✭✭
    edited December 2016

    Hi David,
    I had a similar issue to yours and resolved it by:

    • Downloading the "android_m2repository_r22.zip" as mentioned by Abdul
    • Create a folder called "content" in the directory mentioned by Abdul ("C:\Users\Javaad\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.0.1.3"), yours will have a different user name.
    • Then extract the contents of that zip file into the "content" folder.
    • Clean your project
    • Build.

    This solved it for me. Hope it helps and for anyone else that runs into this Xamarin issue.

  • AlanClarkAlanClark USForum Administrator, Xamarin Team Xamurai

    There is also this guide for some Android library installation issues:

    https://developer.xamarin.com/guides/android/troubleshooting/resolving-library-installation-errors/

Sign In or Register to comment.