The import android.support.v7.app.MediaRouteActionProvider cannot be resolved

Developer picture Developer · Feb 19, 2014 · Viewed 27.3k times · Source

I am trying to use GoogleMap V2 .But i am getting error on import these :

import android.support.v7.app.MediaRouteActionProvider;
import android.support.v7.media.MediaRouteSelector;
import android.support.v7.media.MediaRouter;
import android.support.v7.media.MediaRouter.RouteInfo;

And the error is

The import android.support.v7.app.MediaRouteActionProvider cannot be resolved

Here is the screen shot of the library that i have added

enter image description here

What i have to do .I have tried to import android\support\v7 By Build path .But it is not resolving my issue in there any way so that i can resolve these errors.

Answer

Raghunandan picture Raghunandan · Feb 19, 2014

It looks like you have added gridlayout.jar to the projects lib folder.

Its a library project with resources. You need to reference the library project in your android projet

This library is located in the <sdk>/extras/android/support/v7/gridlayout/ directory after you download the Android Support Libraries.

Follow Adding libraries with resources

http://developer.android.com/tools/support-library/setup.html#libs-with-res