I am trying to add v7 support for action bars to my project and followed the steps on the android dev site but still doesn't work...
In my gradle file I have
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:13.0.+'
compile "com.android.support:appcompat-v7:18.0.+"
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}
just like it says to do but when I try to import the class or use the resource, it isn't found.
I also downloaded the latest support library and repository in the sdk manager as well.
Am I missing a step or setting?
I fixed it.... All I needed to do was run
./gradlew clean build
in the root of my project. Android studio wasn't updating the gradle so it didn't include the external libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With