I’m trying to set up an http cache in my Android app. I have the following code:
val file = File("apolloCache")
ApolloClient.Builder().httpCache(
directory = file,
maxSize = (100 * 1024 * 1024).toLong()
)
The file
object is created successfully. But when I run the second line, the app crashes with this error:
java.lang.NoClassDefFoundError: Failed resolution of: Lokio/FileSystem;
at com.apollographql.apollo3.cache.http.HttpCache.configureApolloClientBuilder(HttpCacheExtensions.kt:77)
What am I missing here?
1