java.lang.IllegalArgumentException: The view is not associated with BottomSheetBehavior

I've solved it, and I want to post the answer in case someone else has the same problem, when you import the layout that contains the BottomSheet you must not include layout_width and layout_height:

<include layout="@layout/btmsht_principal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

so it has to be:

<include layout="@layout/btmsht_principal"/>

In Bottom sheet main content use:

app:layout_behavior="android.support.design.widget.BottomSheetBehavior"

In Main activity use with include layout app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"

Your problem solved