Execution failed for task ':app:processDebugResources'. > Android resource linking failed error: attribute behaviour_hideable not found
I am trying to use Bottom sheet in my app,added BottomSheetActivity which has coordinate layout, layout of BottomSheetActivity includes view_cart_bottom_sheet.xml which has linear layout and will serve as bottom sheet UI.When i added these 2 tags in view_cart_bottom_sheet.xml linear layout addapp:behaviour_hideable ="true" app:behaviour_peekHeight ="30dp",build gets failed with below error:
Android resource linking failed Output: /Applications/androidprojects/C/app/src/main/res/layout/view_cart_bottom_sheet.xml:3: error: attribute behaviour_hideable (aka packagename:behaviour_hideable) not found. /Applications/androidprojects/C/app/src/main/res/layout/view_cart_bottom_sheet.xml:3: error: attribute behaviour_peekHeight (aka packagename:behaviour_peekHeight) not found. error: failed linking file resources.
I am just trying an example wherein i want to test behavior of bottom sheet to get hide on click of button which is in main activity.
My code below:
acitvity_bottom_sheet.xml file:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".BottomSheetActivity">
<include layout="@layout/content_bottom_sheet" />
<include layout="@layout/view_cart_bottom_sheet"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/test_bottom_sheet"/>
</android.support.design.widget.CoordinatorLayout>
BottomSheetActivity.Java code:
public class BottomSheetActivity extends AppCompatActivity implements View.OnClickListener{
Button click_bottom_sheet;
private BottomSheetBehavior mBottomSheetBheavior;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bottom_sheet);
click_bottom_sheet = (Button)findViewById(R.id.test_bottom_sheet);
click_bottom_sheet.setOnClickListener(this);
View bottomSheetView = findViewById(R.id.bottom_sheet_view);
mBottomSheetBheavior = BottomSheetBehavior.from(bottomSheetView);
}
@Override
public void onClick(View v) {
mBottomSheetBheavior.setState(BottomSheetBehavior.STATE_HIDDEN);
}
}
view_cart_bottom_sheet.xml code:
<?xml version="1.0" encoding="utf-8"?>
<tools:LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:background="#00ff00"
android:id="@+id/bottom_sheet_view"
app:layout_behavior="@string/bottom_sheet_behavior"
app:behaviour_hideable ="true"
app:behaviour_peekHeight ="30dp"
tools:showIn ="@layout/activity_bottom_sheet">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="18sp"
android:textColor="@color/white"
android:textStyle="bold|italic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"/>
<TextView
android:textSize="12sp"
android:textStyle="bold|italic"
android:textColor="@color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ADD PAYMENT METHOD"/>
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
/>
<ImageButton
android:layout_width="90dp"
android:layout_height="80dp"
android:layout_gravity="right"
android:src="@drawable/ic_move_ahead_arrow"
android:layout_marginRight="10dp"
/>
</tools:LinearLayout>
Gradle file:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
buildToolsVersion "28.0.3"
signingConfigs {
config {
keyAlias 'key0'
keyPassword '123456'
storeFile file('/home/repo/Desktop/FOODCUBO.jks')
storePassword '123456'
}
}
compileSdkVersion 28
defaultConfig {
applicationId 'com.foodcubo.foodcubo.android'
minSdkVersion 16
targetSdkVersion 28
versionCode 4
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.config
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
buildTypes {
release {
debuggable false
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
incremental = false
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.4.0'
implementation 'com.github.d-max:spots-dialog:0.7@aar'
implementation 'com.stepstone.apprating:app-rating:2.0.0'
implementation 'io.paperdb:paperdb:2.1'
//noinspection GradleCompatible
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.github.rey5137:material:1.2.5'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
implementation 'com.android.support:design:28.0.0'
implementation 'com.github.mancj:MaterialSearchBar:0.7.6'
implementation 'com.quinny898.library.persistentsearch:library:1.1.0-SNAPSHOT'
implementation 'com.github.arimorty:floatingsearchview:2.1.1'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
implementation 'com.cepheuen.elegant-number-button:lib:1.0.2'
// implementation 'com.android.support:design:28.0.0'
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
//implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.firebaseui:firebase-ui-database:3.3.1'
implementation 'android.arch.core:runtime:1.1.1'
implementation 'android.arch.core:common:1.1.1'
implementation 'com.github.andremion:counterfab:1.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.android.gms:play-services-places:16.0.0'
//noinspection UseOfBundledGooglePlayServices
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.daimajia.slider:library:1.1.5@aar'
implementation "com.android.support:support-v4:+"
// implementation 'com.squareup.picasso:picasso:2.71828'
/*going back to old version of picasso due to unresolved issue of abstract method "void com.squareup.picasso.Callback.onError which
* is open in picasso itself https://github.com/square/picasso/issues/1928
* chnage done by sonal*/
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.facebook.android:account-kit-sdk:4.37.0'
implementation 'com.karumi:dexter:5.0.0'
}
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
Comments
Post a Comment