Reputation: 101
I want to add the app:layout_behavior
attribute in xml file but it not supported. Which library should I add in gradle file?
compile 'com.android.support:design:22.2.0
when I add this compile library android Studio gives error I have to androidx library to support that app:layout_behavior
.
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.expensemanager"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'com.google.firebase:firebase-auth:19.0.0'
implementation 'com.google.firebase:firebase-database:19.1.0'
implementation 'com.google.firebase:firebase-functions:19.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
please help me what should i implement to support app:layout_behavior
Upvotes: 1
Views: 78
Reputation: 363935
Use the Material Components Library which is a drop-in replacement for Android's Design Support Library.
implementation 'com.google.android.material:material:1.1.0-beta02'
or the latest stable version:
implementation 'com.google.android.material:material:1.0.0'
Upvotes: 2