TvFlix android app using Dagger Hilt, Coroutines, Flow, KTX, Jetpack(Room, ViewModel, Paging3, Lifecycle) based on MVVM with clean code architecture purely written in Kotlin
launching app with api 18 device got crash immediately, but no problem running with device with api 21 or higher
com.android.tvmaze.dev.debug E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
java.lang.NoClassDefFoundError: java.util.Objects
at okhttp3.Address.hashCode(Address.kt:180)
at okhttp3.Route.hashCode(Route.kt:84)
at java.util.HashMap.containsKey(HashMap.java:332)
at java.util.HashSet.contains(HashSet.java:138)
at okhttp3.internal.connection.RouteDatabase.shouldPostpone(RouteDatabase.kt:40)
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:74)
Seems like MultiDex problem, MultiDex under api 21 and code under heavy dependicy likely cause this kind of problem. create multiDexKeepFile and multiDexKeepProguard maybe help.
launching app with api 18 device got crash immediately, but no problem running with device with api 21 or higher
com.android.tvmaze.dev.debug E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher java.lang.NoClassDefFoundError: java.util.Objects at okhttp3.Address.hashCode(Address.kt:180) at okhttp3.Route.hashCode(Route.kt:84) at java.util.HashMap.containsKey(HashMap.java:332) at java.util.HashSet.contains(HashSet.java:138) at okhttp3.internal.connection.RouteDatabase.shouldPostpone(RouteDatabase.kt:40) at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:74)
Seems like MultiDex problem, MultiDex under api 21 and code under heavy dependicy likely cause this kind of problem. create multiDexKeepFile and multiDexKeepProguard maybe help.