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;
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.
Similarly add the module dependency using this way. Also before building the project make sure you do the same to the module project
运行gradle clean build
命令
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.