NetworkOnMainThreadException при использовании в качестве ключа LaunchedEffect ⇐ Android
-
Anonymous
NetworkOnMainThreadException при использовании в качестве ключа LaunchedEffect
When I use
LaunchedEffect(Dispatchers.IO) I get,
NetworkOnMainThreadException
How should I use this function to run on background thread?
this is my code:
LaunchedEffect(Dispatchers.IO) { val input = URL("https://rezaapp.downloadseriesmovie.ir/maintxt.php").readText() println(input) } I'm using it inside my jetpack compose project
Источник: https://stackoverflow.com/questions/743 ... effect-key
When I use
LaunchedEffect(Dispatchers.IO) I get,
NetworkOnMainThreadException
How should I use this function to run on background thread?
this is my code:
LaunchedEffect(Dispatchers.IO) { val input = URL("https://rezaapp.downloadseriesmovie.ir/maintxt.php").readText() println(input) } I'm using it inside my jetpack compose project
Источник: https://stackoverflow.com/questions/743 ... effect-key
Мобильная версия