Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: package android.support.v7.app does not exist [ANDROID STUDIO]

I'm trying to compile a project using Android Studio and this error show up. I've already imported the appcompat in the build.gradle file:

dependencies {
    compile 'com.android.support:support-v4:21.0.+'
    compile 'com.android.support:appcompat-v7:21.0.+'
    compile 'com.melnykov:floatingactionbutton:1.1.0'
}

and in several files I've imported this:

import android.support.v7.app.ActionBarActivity;
like image 202
Marco Gagino Avatar asked Mar 18 '23 04:03

Marco Gagino


1 Answers

Remove this dependency from Gradle file and add from

Project(right click) -> Project Structure ->click on your application-> Dependencies -> Add button(right side) ->library dependency -> Choose V7 libary.

enter image description here

Similarly add the module dependency using this way. Also before building the project make sure you do the same to the module project

like image 106
droid kid Avatar answered Apr 06 '23 12:04

droid kid