[small tips]意気揚々とAndroid開発にcoroutineを導入したらProGuardでコケた

・・・掲題の通りです・・・

皆様もどうぞお気をつけください。

## 環境

```
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
```
ちなみにAndroidStudioは3.5です。

## Githubで公開されている設定（[こちら](https://github.com/Kotlin/kotlinx.coroutines#r8-and-proguard)）

```coroutines.pro
# ServiceLoader support
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}

# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembernames class kotlinx.** {
    volatile <fields>;
}
```

## 解決方法：以下の１行を上記に追加する([こちらを参考にしました](https://github.com/Kotlin/kotlinx.coroutines/issues/1270#issuecomment-528461594)）

```
-dontwarn kotlinx.coroutines.flow.**inlined**
```

## 一応、エラー内容

```ProGuard
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$10$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$10
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$2$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$2
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$4$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$4
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$5$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$5
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$6$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$6
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$7$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$7
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$8$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$8
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$9$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$9
Warning: kotlinx.coroutines.flow.FlowKt__BuildersKt$flowOf$$inlined$unsafeFlow$1$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__BuildersKt$flowOf$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__ContextKt$flowWith$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__ContextKt$flowWith$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__CountKt$count$$inlined$collect$2$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__CountKt$count$$inlined$collect$2
Warning: kotlinx.coroutines.flow.FlowKt__DelayKt$debounce$2$values$1$invokeSuspend$$inlined$collect$1$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__DelayKt$debounce$2$values$1$invokeSuspend$$inlined$collect$1
Warning: kotlinx.coroutines.flow.FlowKt__DelayKt$sample$2$values$1$invokeSuspend$$inlined$collect$1$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__DelayKt$sample$2$values$1$invokeSuspend$$inlined$collect$1
Warning: kotlinx.coroutines.flow.FlowKt__DistinctKt$distinctUntilChanged$$inlined$distinctUntilChangedBy$FlowKt__DistinctKt$1$2: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__DistinctKt$distinctUntilChanged$$inlined$distinctUntilChangedBy$FlowKt__DistinctKt$1
Warning: kotlinx.coroutines.flow.FlowKt__DistinctKt$distinctUntilChanged$$inlined$distinctUntilChangedBy$FlowKt__DistinctKt$1$2$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__DistinctKt$distinctUntilChanged$$inlined$distinctUntilChangedBy$FlowKt__DistinctKt$1$2
Warning: kotlinx.coroutines.flow.FlowKt__DistinctKt$distinctUntilChangedBy$$inlined$distinctUntilChangedBy$FlowKt__DistinctKt$1$2: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__DistinctKt$distinctUntilChangedBy$$inlined$distinctUntilChangedBy$FlowKt__DistinctKt$1
Warning: kotlinx.coroutines.flow.FlowKt__DistinctKt$distinctUntilChangedBy$$inlined$distinctUntilChangedBy$FlowKt__DistinctKt$1$2$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__DistinctKt$distinctUntilChangedBy$$inlined$distinctUntilChangedBy$FlowKt__DistinctKt$1$2
Warning: kotlinx.coroutines.flow.FlowKt__EmittersKt$onCompletion$$inlined$unsafeFlow$1$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__EmittersKt$onCompletion$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__EmittersKt$onStart$$inlined$unsafeFlow$1$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__EmittersKt$onStart$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__ErrorsKt$catchImpl$$inlined$collect$1$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__ErrorsKt$catchImpl$$inlined$collect$1
Warning: kotlinx.coroutines.flow.FlowKt__ErrorsKt$retryWhen$$inlined$unsafeFlow$1$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__ErrorsKt$retryWhen$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__LimitKt$drop$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__LimitKt$drop$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__LimitKt$dropWhile$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__LimitKt$dropWhile$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__LimitKt$take$$inlined$unsafeFlow$1$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__LimitKt$take$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__LimitKt$take$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__LimitKt$take$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__LimitKt$takeWhile$$inlined$unsafeFlow$1$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__LimitKt$takeWhile$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__LimitKt$takeWhile$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__LimitKt$takeWhile$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1
Warning: kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2
Warning: kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapMerge$$inlined$map$1$2: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapMerge$$inlined$map$1
Warning: kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapMerge$$inlined$map$1$2$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapMerge$$inlined$map$1$2
Warning: kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__ReduceKt$first$$inlined$collect$2$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__ReduceKt$first$$inlined$collect$2
Warning: kotlinx.coroutines.flow.FlowKt__ReduceKt$reduce$$inlined$collect$1$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__ReduceKt$reduce$$inlined$collect$1
Warning: kotlinx.coroutines.flow.FlowKt__TransformKt$filterNotNull$$inlined$unsafeTransform$1$2: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__TransformKt$filterNotNull$$inlined$unsafeTransform$1
Warning: kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1
Warning: kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2
Warning: kotlinx.coroutines.flow.FlowKt__TransformKt$scan$$inlined$unsafeFlow$1$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__TransformKt$scan$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__TransformKt$scan$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__TransformKt$scan$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__TransformKt$scanReduce$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__TransformKt$scanReduce$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__TransformKt$withIndex$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__TransformKt$withIndex$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.internal.ChannelFlowMerge$collectTo$$inlined$collect$1$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.internal.ChannelFlowMerge$collectTo$$inlined$collect$1
Warning: kotlinx.coroutines.flow.internal.ChannelFlowMerge$collectTo$$inlined$collect$1$lambda$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.internal.ChannelFlowMerge$collectTo$$inlined$collect$1
Warning: kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$invokeSuspend$$inlined$collect$1$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$invokeSuspend$$inlined$collect$1
Warning: kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$invokeSuspend$$inlined$collect$1$lambda$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$invokeSuspend$$inlined$collect$1
Warning: kotlinx.coroutines.flow.internal.CombineKt$zipImpl$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.internal.CombineKt$zipImpl$$inlined$unsafeFlow$1
Warning: kotlinx.coroutines.flow.internal.FlowCoroutineKt$scopedFlow$$inlined$unsafeFlow$1$lambda$1: can't find enclosing method 'java.lang.Object collect$$forInline(kotlinx.coroutines.flow.FlowCollector,kotlin.coroutines.Continuation)' in program class kotlinx.coroutines.flow.internal.FlowCoroutineKt$scopedFlow$$inlined$unsafeFlow$1
```