Я пытаюсь внедрить нижний модальный лист в мой основной проект. Я успешно сделал это в одном демонстрационном проекте. Но когда я применяю ту же структуру к основному проекту, приложение вылетает со следующей ошибкой:
android.view.InflateException: строка двоичного XML-файла # 40: не удалось
Раздувать поведение подкласса
android.support.design.widget.BottomSheetBehavior
Вызвано: java.lang.RuntimeException: Не удалось раздуть подкласс поведения android.support.design.widget.BottomSheetBehavior
AndroidRuntime: вызвано: java.lang.ClassNotFoundException: не
найти класс "android.support.design.widget.BottomSheetBehavior" в
путь: DexPathList [[zip-файл »/data/app/com.example........]]
Я попробовал ранее указанный app:layout_behavior="@string/bottom_sheet_behavior"
в моем xml, но это не сработало.
В демонстрационном проекте нижний лист работает правильно во вложенном родительском представлении.
Мои основные зависимости проекта - (добавлено в app build.gradle)
def lifecycle_version = "2.1.0-alpha02"
def room_version = "2.1.0-alpha04"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'me.relex:circleindicator:2.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
annotationProcessor "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"