4

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;
RockerFlower
  • 727
  • 2
  • 10
  • 28
Marco Gagino
  • 101
  • 2
  • 2
  • 4

2 Answers2

7

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

droid kid
  • 7,569
  • 2
  • 32
  • 37
0

Run gradle clean build command

Shahidul
  • 2,997
  • 1
  • 21
  • 20