diff --git a/build.gradle b/build.gradle index 9fe5dc1..840d8e2 100644 --- a/build.gradle +++ b/build.gradle @@ -19,11 +19,11 @@ ext { dependencies = [:] - dependencies.coreKtx = 'androidx.core:core-ktx:1.9.0' + dependencies.coreKtx = 'androidx.core:core-ktx:1.10.1' dependencies.appcompat = 'androidx.appcompat:appcompat:1.6.1' - dependencies.material = 'com.google.android.material:material:1.8.0' - dependencies.activityKtx = 'androidx.activity:activity-ktx:1.7.0' - dependencies.fragmentKtx = 'androidx.fragment:fragment-ktx:1.5.6' + dependencies.material = 'com.google.android.material:material:1.9.0' + dependencies.activityKtx = 'androidx.activity:activity-ktx:1.7.2' + dependencies.fragmentKtx = 'androidx.fragment:fragment-ktx:1.6.0' dependencies.multidex = 'androidx.multidex:multidex:2.0.1' dependencies.utilcodex = 'com.blankj:utilcodex:1.31.1' dependencies.constraintlayout = 'androidx.constraintlayout:constraintlayout:2.1.4' diff --git a/mvvmrapid/src/main/java/com/brave/mvvmrapid/core/common/CommonActivity.kt b/mvvmrapid/src/main/java/com/brave/mvvmrapid/core/common/CommonActivity.kt index 13eae3c..c415d65 100644 --- a/mvvmrapid/src/main/java/com/brave/mvvmrapid/core/common/CommonActivity.kt +++ b/mvvmrapid/src/main/java/com/brave/mvvmrapid/core/common/CommonActivity.kt @@ -81,9 +81,9 @@ abstract class CommonActivity : App binding.setVariable(variableId, viewModel) // 支持LiveData绑定xml,数据改变,UI自动会更新 binding.lifecycleOwner = this - // 让ViewModel拥有View的生命周期感应 - lifecycle.addObserver(viewModel) } + // 让ViewModel拥有View的生命周期感应 + lifecycle.addObserver(viewModel) } }