RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.81k stars 405 forks source link

Proguard issue: io.fotoapparat.coroutines.AwaitBroadcastChannel: can't find referenced method 'boolean cancel()' in program class kotlinx.coroutines.CompletableDeferred #391

Open ZakTaccardi opened 4 years ago

ZakTaccardi commented 4 years ago
io.fotoapparat.coroutines.AwaitBroadcastChannel: can't find referenced method 'boolean cancel()' in program class kotlinx.coroutines.CompletableDeferred

The issue is AwaitBroadcastChannel

https://github.com/RedApparat/Fotoapparat/blob/09a551635c6da6569911de0ba94ec40b5339781a/fotoapparat/src/main/java/io/fotoapparat/coroutines/AwaitBroadcastChannel.kt#L34-L36

I would guess that copying the deprecation warning and providing the correct cancel(..) that accepts a CancellationException would fix the issue? Or maybe just specifying deprecation level?

See ConflatedBroadcastChannel

ZakTaccardi commented 4 years ago

Is the following the correct solution?

-dontwarn io.fotoapparat.coroutines.AwaitBroadcastChannel
eduardoyurencb commented 4 years ago

I have the same issue.

micaelomota commented 4 years ago

I have the same issue.