我在扩展BottomSheetDialogFragment的整个类中出错
Cannot access 'androidx.lifecycle.HasDefaultViewModelProviderFactory' which is a supertype of 'FavoriteBottomDialogFragment'. Check your module classpath for missing or conflicting dependencies
Run Code Online (Sandbox Code Playgroud)
该类位于 app 模块中,该模块实现了另外两个模块:core 和presentation-core
构建.gradle
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project (':core')
implementation project (':presentation-core')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
testImplementation 'junit:junit:4.12'
implementation "com.google.android.material:material:1.1.0"
//Rx
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
implementation "io.reactivex.rxjava2:rxjava:2.2.9"
//Architecture component
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'androidx.room:room-runtime:2.0.0'
kapt 'androidx.room:room-compiler:2.0.0'
kapt 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
implementation 'androidx.room:room-rxjava2:2.0.0'
implementation 'androidx.room:room-guava:2.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
}
Run Code Online (Sandbox Code Playgroud)
核心依赖
dependencies {
api fileTree(dir: 'libs', include: …Run Code Online (Sandbox Code Playgroud) 我想在包含许多项目的下拉菜单中显示滚动条。
主要是为了让用户知道他可以滚动查看更多项目
有任何想法吗 ?
DropdownMenu(
properties = PopupProperties(focusable = false),
modifier = Modifier
.fillMaxWidth()
.heightIn(max = maxHeightDropdownMenu) ,
expanded = true,
onDismissRequest = {}
) {
list.forEach {
Item(
name = it.name,
clickable = Clickable(enabled = true) {
onItemClicked(it)
}
)
}
}
Run Code Online (Sandbox Code Playgroud)