hnvn / flutter_image_cropper

A Flutter plugin for Android and iOS supports cropping images
971 stars 374 forks source link

after updating flutter I get an error using "flutter build apk" - Flutter version 1.10.15 #97

Open Joao-b4 opened 4 years ago

Joao-b4 commented 4 years ago

after updating the flutter, i am getting the error, it only happens to me when i use the "flutter build apk", so the terminal seems to be some incompatibility with ucrop.

pubspec.yaml

  image_cropper:
    git:
      url: git://github.com/devslane/flutter_image_cropper
      ref: master

flutter doctor -v

[√] Flutter (Channel master, v1.10.15-pre.248, on Microsoft Windows [versão 10.0.18362.418], locale pt-BR)
    • Flutter version 1.10.15-pre.248 at C:\src\flutter
    • Framework revision b9eb3f717a (20 hours ago), 2019-10-24 11:18:55 -0700
    • Engine revision 2abf1101b4
    • Dart version 2.6.0 (build 2.6.0-dev.8.2 081c01e89a)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\Dev\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 38.2.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

error:


What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
   > Could not find com.github.devslane:uCrop:2.2.4.
     Searched in the following locations:
       - file:/C:/Users/Dev/AppData/Local/Android/Sdk/extras/m2repository/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.pom
       - file:/C:/Users/Dev/AppData/Local/Android/Sdk/extras/m2repository/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.jar
       - file:/C:/Users/Dev/AppData/Local/Android/Sdk/extras/google/m2repository/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.pom
       - file:/C:/Users/Dev/AppData/Local/Android/Sdk/extras/google/m2repository/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.jar
       - file:/C:/Users/Dev/AppData/Local/Android/Sdk/extras/android/m2repository/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.pom
       - file:/C:/Users/Dev/AppData/Local/Android/Sdk/extras/android/m2repository/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.jar
       - https://dl.google.com/dl/android/maven2/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.pom
       - https://dl.google.com/dl/android/maven2/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.jar
       - https://jcenter.bintray.com/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.pom
       - https://jcenter.bintray.com/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.jar
       - http://download.flutter.io/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.pom
       - http://download.flutter.io/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.jar
       - file:/C:/Users/Dev/Documents/AndroidStudioProjects/new_rdo/build/app/outputs/repo/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.pom
       - file:/C:/Users/Dev/Documents/AndroidStudioProjects/new_rdo/build/app/outputs/repo/com/github/devslane/uCrop/2.2.4/uCrop-2.2.4.jar
     Required by:
         project :app > vn.hunghd.flutter.plugins.imagecropper:image_cropper_release:1.0
 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.`` ` 
edeuss commented 4 years ago

I am getting the same thing @Joao-b4

This also affects 1.10.14

develbass commented 4 years ago

hello, Did you add "maven { url "https://jitpack.io" }" within build.gradle?

allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } }

DemoJameson commented 4 years ago

same here: FAILURE: Build failed with an exception.

IHKodifier commented 4 years ago

im facing this issue and ha a gut feeling that it has something to do with image cropper plugin.

have tried add maven { url "https://jitpack.io" } in build.gradle and the issue changed to

':app:transformClassesWithMultidexlistForDebug'.

com.android.build.api.transform.TransformException: Error while generating the main dex list.

srburton commented 4 years ago

Same problem happens here ...

msarkrish commented 3 years ago

@Joao-b4 @EliasDeuss @DemoJameson @IHKodifier @srburton Anyone found solution for this Issue?

msarkrish commented 3 years ago

Thank you @develbass After adding below code to my projects build.gradle solved the Issue.

maven { url "https://jitpack.io" }