justsoft / video_thumbnail

This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
MIT License
183 stars 225 forks source link

Execution failed for task ':video_thumbnail:compileDebugJavaWithJavac'. #121

Open quangvinhvux opened 2 years ago

quangvinhvux commented 2 years ago

hi guy, I have an issue on 5.0.2 this is the log: Flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_thumbnail-0.5.2/android/src/main/java/xyz/justsoft/video_thumbnail/VideoThumbnailPlugin.java:253: error: unreported exception IOException; must be caught or declared to be thrown retriever.release(); Execution failed for task ':video_thumbnail:compileDebugJavaWithJavac'.

gradle-7.4.2 compileSdkVersion 33 Thank you for your work here.

itxmubi commented 2 years ago

i got the same issue when i add a package Flutter_applovin_max. https://pub.dev/packages/flutter_applovin_max in my project

logs:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':video_thumbnail:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
compileSdkVersion 33

 applicationId "com.xxxxx.xxxxxx.xxxxxx.xxxxxx.xxxxx"
        minSdkVersion 21
        targetSdkVersion 31
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName

any idea about that?

LiuWanJun1988 commented 2 years ago

Also I got some issue. please let me know how to fix this issue

ajbcoder commented 2 years ago

Hi guys, @quangvinhvux, @itxmubi, @LiuWanJun1988! 👉 I also faced the same issue for 3 days and finally edited the code to fix the issues and also submitted a pull request of my edits!

✅ Workaround: 👉 While we wait for the approval of my edits or the author's solution, if you want use the link below to add my edited package and move on with your build.

Add it to your pubspec.yaml file:

video_thumbnail:
    git: https://github.com/ajbcoder/video_thumbnail

Hope I saved someone's day!

itxmubi commented 2 years ago

My error was solved after adding the following dependency

dependencies {
    ....
    implementation ('com.google.android.exoplayer:exoplayer:2.17.0')
}

Answer is here

mihribansahin commented 1 year ago

i use the video_editor ^2.2.0, i have this problem(only android) ;

Because video_editor >=1.4.4 depends on video_thumbnail from hosted and memodram depends on video_thumbnail from git, video_editor >=1.4.4 is forbidden. So, because memodram depends on video_editor ^2.2.0, version solving failed. pub get failed

please help me :)