I tried using OkHttp and Picasso (following this answer) for disk caching of images that I was downloading from Firebase storage. Now, the app gives exceptions and crashes.
This error also occurs because of the differences in libraries' version specification that can lead to runtime errors.
Always use same versions of libraries in build.gradle.
For example:
Use this:
implementation 'com.google.android.gms:play-services-location:11.6.0'
implementation 'com.google.android.gms:play-services-auth:11.6.0'
Instead of:
implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.google.android.gms:play-services-auth:11.6.0'