If you updated required libraries and still encountering unresolved reference error, maybe some libraries overriding the latest classes with old version classes. You should check and compare your gradle versions and the current versions first. Then you can fix it by forcing to use the lastest version like below.
In app level build.gradle:
implementation "androidx.activity:activity-ktx:1.9.3"
implementation 'androidx.fragment:fragment-ktx:1.8.5'
implementation 'androidx.appcompat:appcompat:1.7.0'
In project level build.gradle:
allprojects {
configurations.configureEach {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.fragment' && details.requested.name == 'fragment') {
details.useVersion '1.8.5'
}
}
}
}
If you updated required libraries and still encountering unresolved reference error, maybe some libraries overriding the latest classes with old version classes. You should check and compare your gradle versions and the current versions first. Then you can fix it by forcing to use the lastest version like below.
In project level build.gradle:
allprojects {
configurations.configureEach {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.fragment' && details.requested.name == 'fragment') {
details.useVersion '1.8.5'
}
}
}
}