Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update Kotlin coroutines
authored
Sep 27, 2023
by
umaumax
Show whitespace changes
Inline
Side-by-side
Kotlin-coroutines.md
View page @
f5f99e9b
...
...
@@ -412,10 +412,21 @@ e.g. `java -Dkotlinx.coroutines.debug -jar ./app/build/libs/app-jvm.jar`
## トラブルシューティング
### Unresolved reference: launch
`Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:`
*
`launch`
は
`runBlocking`
や
`coroutineScope`
などのスコープ内でしか利用できない
> launch {} function で Coroutine を開始でき、コードブロック内に並列に実行する処理を記述できます。
e.g.
```
kotlin
import
kotlinx.coroutines.GlobalScope
GlobalScope
.
launch
{
..
.
}
```
### Error: Main method must return a value of type void
```
bash
Error: Main method must
return
a value of
type
void
in
class com.example.AppKt, please
...
...
...
...