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 116 forks source link

Cant install Plugin in pubspec.yaml AndroidX Incompatibilities #49

Closed zgramming closed 4 years ago

zgramming commented 4 years ago

I try to install this plugin in pubspec.yaml but getting this error :

e: C:\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\image_downloader-0.19.0\android\src\main\kotlin\com\ko2ic\imagedownloader\ImageDownloaderPlugin.kt: (355, 41): Unresolved reference: random

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':image_downloader:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 24s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

I have already :

flutter clean
uninstall app in my device and install again this plugin

Can you help me with this ?

zgramming commented 4 years ago

Another Error after re-install plugin

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.2) classpath. You should manually set the same version via DependencyResolution

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************
Gradle task assembleDebug failed with exit code 1
ko2ic commented 4 years ago

@zgramming Please version up Kotlin of your app. And Please refer to the following. https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility