it gives me an android.os.NetworkOnMainThreadException
stackoverflow 4
g
gildor
04/13/2018, 9:56 AM
You obviously run some network request on MainThread. LiveData doesn’t run your computation on a separate thread.
Run it on a separate thread or use some async network client (like okhttp)