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

Failed in build release. 'Could not resolve project :image_downloader.' #18

Closed AlexV525 closed 5 years ago

AlexV525 commented 5 years ago

Hi there! Everything works fine in debug mode of app, but when I tried to build release, this error came out. Hope you can take some time to help me. :) Error Log

[        ] FAILURE: Build failed with an exception.
[   +2 ms] * What went wrong:
[        ] Execution failed for task ':app:lintVitalRelease'.
[        ] > Could not resolve all artifacts for configuration ':app:dynamicProfileRuntimeClasspath'.
[   +1 ms]    > Could not resolve project :image_downloader.
[   +1 ms]      Required by:
[        ]          project :app
[        ]       > java.lang.NullPointerException (no error message)
[        ] * Try:
[        ] Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[        ] * Exception is:
[        ] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:lintVitalRelease'.

Flutter doctor: (I'm using Android Studio)

[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17763.379], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[!] IntelliJ IDEA Ultimate Edition (version 2018.3)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (1 available)
ko2ic commented 5 years ago

@AlexVincent525 This doesn't happen with samples or my project, so it seems to be a problem with your app.

Would you like to solve it below?
https://stackoverflow.com/questions/45839593/gradle-build-lintvitalrelease-nullpointerexception

AlexV525 commented 5 years ago

@ko2ic Thank's for your quick reply! Method 1 doesn't work for me, my project is native flutter and i couldn't find lint-results-release-fatal.html in my project. Method 2 works fine but I think it's bad for project code's correction and stability, so can you help me figured out why this happened?

ko2ic commented 5 years ago

@AlexVincent525 when you start Android Studio in your project's android directory, is there the file?
In any case, this feels directly not related to image_downldoer.

ko2ic commented 5 years ago

@AlexVincent525 I do not know if it is relevant, but is the following helpful?
https://github.com/facebook/react-native/issues/5752#issuecomment-254916338

AlexV525 commented 5 years ago

@AlexVincent525 when you start Android Studio in your project's android directory, is there the file? In any case, this feels directly not related to image_downldoer.

I just searched all files in my project (Flutter based), neither the android folder has build folder nor the build folder at root has this file.

AlexV525 commented 5 years ago

@ko2ic I solve this by using this method. https://github.com/apptreesoftware/flutter_barcode_reader/issues/51#issuecomment-454301465 It seems like a issue related with gradle. Thank you for your patience in helping me !