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
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
this solution worked for me:
The support library android-support-v4.jar
cause this conflictand you see the error: The import android.support.v7.app.MediaRouteActionProvider cannot be resolved
, just delete the library under /libs folder of your project, because the library is already contained in the library appcompat_v7
, clean and build your project, and your project will work like a charm!
I had a very similar problem to this after I had used force to close Eclipse.
When I then restarted Eclipse, I noticed a number of "appcompat_v7..." folders in my workspace directory. I deleted these - and maybe that was the cause of this problem.
But I resolved it by creating a new Test project in Eclipse, then restarting Eclipse to find all my projects compiled again! :)
I didn't need to change any project properties.
These type of Errors generally occurs when we accidentally close these libraries(by close unrelated projects,etc) which are automatically generated In Project Explorer of Eclipse like:
As soon as I open these files,all the errors in my app were vanished !
If It till then didn't work then do Project -> Properties -> Android -> Is Library -> Add.. -> And add appcompat_v7_*
had the same problem and found that the link in my project to the appcomcat_v7 project is broken (right-click project and choose properties, then head to the Android tab)...
i removed and then added the correct project and i was good to go...