javaandroidpackagerss-reader

The import android.support cannot be resolved


I am trying to run the code provided HERE
I downloaded the code from their Github and imported into Android SDK, but it shows error at the lines

import android.support.v4.app.FragmentActivity;
import android.support.v4.app.NavUtils;  

in multiple files. However if I check the Android SDK Manager, the Android Support Library as well as the Android Support Repository in the Extras folder are both installed. I can also see the support folder and it's contents in the SDK_INSTALL\sdk\extras\android\support directory. It also has the v4 folder which also contains the android-support-v4.jar and the src folder. THen why is it still showing the error, how do I resolve it and how do I get that sample code running? THe sample code is for an RSS reader app, if that's relevant.


Solution

  • Follow these steps:

    For Eclipse:

    For Android Studio:

    Short Version:

    Long Version:

    Further reading regarding this Question:

    1. Support Library - Android Dev
    2. Recent Support Library Revisions
    3. Support Library Packages
    4. What is an Android Support Library?
    5. How do the Android Support Libraries work?