Im in an android programming class and I am trying to add an
I\'m in an android programming class and I am trying to add an action bar to my app.
The actionbaractivity shown below is underlined in red saying it cannot resolve the symbol. From what I understand I have to add a dependencies in the build.gradle. I imported this project and there does not seem to be one in it. Is there a way for me to add a build.gradle or something similair. Thanks in advance.
Solution
Step 1
Open your SDK manager and make sure that \"Android Support Repository\" is installed. If not select the option and Install packages. You will fins your Support repository here
SDK_DIR\\extras\\android\\m2repository\\com\\android\\support\\appcompat-v7
Step 2
In main module, open build.gradle file and add the dependency for action bar.
dependencies
{
compile \'com.android.support:appcompat-v7:+\'
}
Step 3
Sync your project with gradle through
Tools-> Android-> Sync Project With Gradle Files
Relauch your Android studio to sync your project with gradle.
