ko2ic / image_downloader

Flutter plugin that downloads images and movies on the Internet and saves to Photo Library on iOS or specified directory on Android.
https://pub.dartlang.org/packages/image_downloader#-readme-tab-
MIT License
92 stars 113 forks source link

FAILURE: Build failed with an exception. #131

Closed imalphainc closed 1 year ago

imalphainc commented 1 year ago

e: C:\Users\PRINCE\AppData\Local\Pub\Cache\hosted\pub.dev\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

FAILURE: Build failed with an exception.

BUILD FAILED in 23s Exception: Gradle task assembleDebug failed with exit code 1

imalphainc commented 1 year ago

Problem Solved i Updated android/build.gradle

ext.kotlin_version = '1.6.10'

funjay commented 1 year ago

i get this error in latest kotlin

ext.kotlin_version = '1.8.21'

8thgencore commented 1 year ago

@ko2ic it is possible to solve this problem for new versions of kotlin?

funjay commented 1 year ago

I think the version in git that has the fix is not yet released to pub, do i added the git url directly to my pubspec, that was my current fix.. hope it helps

fabioselau077 commented 1 year ago

You are right. I added the repo link directly in the pub and it worked. Thanks for the tip.

  image_downloader:
    git:
      url: https://github.com/ko2ic/image_downloader
Paradox2405 commented 1 year ago

You are right. I added the repo link directly in the pub and it worked. Thanks for the tip.

  image_downloader:
    git:
      url: https://github.com/ko2ic/image_downloader

this worked as of now. Thanks.