In my android Studio, Compiler is not able to locate ActionBarActivity
. Because of it, I am getting many errors. The compiler is not able to import the ActionBarActivity
and ActionBar
class.
These are the lines where compiler is throwing error:
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
I tried to search on stackoverflow before asking a question. The answer i got is for the eclipse which is to add the library. I tried doing it in Android Studio, but didn't get anything.
This question is related to
android
android-studio
Make sure that in the path to the project there is no foldername having whitespace. While creating a project the specified path folders must not contain any space in their naming.
If the same error occurs in ADT/Eclipse
Add Action Bar Sherlock library in your project.
Now, to remove the "import The import android.support.v7 cannot be resolved" error download a jar file named as android-support-v7-appcompat.jar and add it in your project lib folder.
This will surely removes your both errors.
Source: Stackoverflow.com