I am using Google Map in my Android app, was working properly, now after upgrading
androidx.preference:preference-ktx from 1.1.0 to 1.2.0,
Google Maps stopped displaying map tiles, but everything else is working, tap on map works, ...
I am using Google Map in my Android app, was working properly, now after upgrading
androidx.preference:preference-ktx from 1.1.0 to 1.2.0,
Google Maps stopped displaying map tiles, but everything else is working, tap on map works, ...
Hi did you check the dependencies androidx.preference:preference-ktx:1.2.0
brought? It is possible that some transitive dependency of androidx.preference:preference-ktx:1.2.0
may have caused the update to the same transitive dependency of the Google map library. See Gradle dependency resolution for more info
Also you can print the dependencies tree using the command ./gradlew app:dependencies
where app
is the name of the application Gradle project. See SO post for the same
To fix the issue you have to manually resolve the dependency using below Gradle code
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'culprit dependency group' && details.requested.name == 'culprit dependency version') {
details.useVersion 'fixing version'
details.because 'reason why we have fixed the version'
}
}
}
Details bout dependency resolution at link
In 1.2.0, it added ktx dependencies. It is already posted in Google's issue tracker, but seems Google would not fix it.
https://issuetracker.google.com/issues/238425626
You can have two ways to resolve the issue.
build.gradle > dependencies
implementation 'androidx.preference:preference:1.1.1'
build.gradle > dependencies
implementation('androidx.preference:preference:1.2.0') {
exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel'
exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel-ktx'
}