首页 > 解决方案 > 未解决的参考:bundleOf

问题描述

在更新了一些依赖项后(不确定是哪一个,但它包括navigation-ktx 和fragment-ktx),“bundleOf”消失了。被删除了吗?自动完成只建议我“persistableBundleOf()”,但这不是我需要的。PS我也有“实现'androidx.core:core-ktx:1.3.2'”。UPD:我的 build.gradle:

implementation 'androidx.fragment:fragment-ktx:1.3.1'

implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

def navigation_version = "2.3.4"
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"

标签: androidkotlin

解决方案


推荐阅读