I want to use setExpandedTitleGravity() method from CollapsingToolbarLayout. I just migrated from eclipse to android studio. In eclipse it worked fine, but in android studio compiler gives me the error cannot resolve method setExpandedTitleGravity(int)
.
Apparentely I'm using another version of the design library now, but it seems like it is the last one.
My gradle dependance is: compile 'com.android.support:design:22.2.0'
. Anyone knows why it happens?
Complete build.gradle
file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc3"
defaultConfig {
applicationId "com.example.myapp"
minSdkVersion 15
targetSdkVersion 22
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:design:22.2.0'
}