Reputation: 35
I am migrating to work with android studio and can't seem to be able to add external libraries with Gradle build.
To start, i'm trying to add the support library and use the ViewPager.
I started a new project and added the support library to my dependencies like it says in the android studio page, this is my gradle.build file:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.+'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
}
When I try to use the ViewPager class in my MainActivity.java, it doesn't find the library or asks me to import it.
What am I missing here?
Upvotes: 0
Views: 6817
Reputation: 12015
I'll add my answer from the comments since it might help someone else:
Try to 'clean' and rebuild your project, if it still acting up, try to make and compile the project.
Upvotes: 4