image_downloader icon indicating copy to clipboard operation
image_downloader copied to clipboard

Build failed in 0.31.0

Open khoadng opened this issue 1 year ago • 4 comments

I can't build the app, could you take a look at this error?

V:\Env\flutter\.pub-cache\hosted\pub.dartlang.org\image_downloader-0.31.0\android\src\main\kotlin\com\ko2ic\imagedownloader\ImageDownloaderPlugin.kt: (332, 17): 'when' expression must be exhaustive, add necessary 'is Pending', 'is Successful' branches or 'else' branch instead

khoadng avatar Aug 16 '22 03:08 khoadng

Same issue here!

ttl41 avatar Aug 21 '22 14:08 ttl41

Same problem when using Kotlin 1.7.10

go to android/build.gradle and change ext.kotlin_version = '1.7.10' to ext.kotlin_version = '1.6.10'

This fixed it for me.

Fairfieldfred avatar Aug 25 '22 00:08 Fairfieldfred

Same here

e: ~/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.31.0/android/src/main/kotlin/com/ko2ic/imagedownloader/ImageDownloaderPlugin.kt: (332, 17): 'when' expression must be exhaustive, add necessary 'is Pending', 'is Successful' branches or 'else' branch instead

appcapsergen avatar Oct 31 '22 12:10 appcapsergen

The work-around by @Fairfieldfred works, even when the kotlin version is set to 1.6.21 (in my case), but the missing when branches should still be added!

appcapsergen avatar Oct 31 '22 12:10 appcapsergen