GetStream / stream-chat-flutter

Flutter Chat SDK - Build your own chat app experience using Dart, Flutter and the Stream Chat Messaging API.
https://getstream.io/chat/sdk/flutter/
Other
907 stars 334 forks source link

video_compress package kotlin gradle version error #939

Closed mertguven closed 2 years ago

mertguven commented 2 years ago

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

Android

What version are you using?

stream_chat_flutter - v3.5.0

What happened?

Error:The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.40 and higher. The following dependencies do not satisfy the required version: project ':video_compress' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31

Steps to reproduce

When the project is run

Supporting info to reproduce

No response

Relevant log output

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.40 and higher.
The following dependencies do not satisfy the required version:
project ':video_compress' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31

* 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 1m 5s
Exception: Gradle task assembleDebug failed with exit code 1

Flutter analyze output

No response

Flutter doctor output

[✓] Flutter (Channel stable, 2.10.2, on macOS 12.1 21C52 darwin-arm, locale
    en-TR)
    • Flutter version 2.10.2 at /Users/mertguven/tools/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 097d3313d8 (11 days ago), 2022-02-18 19:33:08 -0600
    • Engine revision a83ed0e5e3
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mertguven/Library/Android/sdk
    • Platform android-32, build-tools 31.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.64.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • SM N9200 (mobile) • 0815f81af6851f02 • android-arm64  • Android 7.0 (API
      24)
    • Chrome (web)      • chrome           • web-javascript • Google Chrome
      98.0.4758.109

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Code of Conduct

MikleJack commented 2 years ago

I have encountered the same problem. I hope it can be solved quickly

rlee1990 commented 2 years ago

I also have the same issue. The only way it seems to solve the issue is if they stop using the plugin or if they get the plugin owner to update it.

MikleJack commented 2 years ago

I found that by manually importing stream chat fluitter package and removing all dependencies related to video_compression can make the project run. I adopted this method because I was doing a temporary school homework, stream_chat_flutter.zip

imtoori commented 2 years ago

Hi everyone this is the issue on the package https://github.com/jonataslaw/VideoCompress/issues/142 Let's put some pressure on that issue, we're just waiting for them to publish a new release.

imtoori commented 2 years ago

Also, we're planning on removing the video compression feature, since there's no easy way to achieve that on flutter That's probably going to happen in v4 (a first beta release should happen in the following days)

imtoori commented 2 years ago

Temporary solution

add this to your pubspec

dependency_overrides:
  video_compress:
      git:
        url: https://github.com/jonataslaw/VideoCompress.git
        ref: master
markfili commented 2 years ago

video_compress: git: url: https://github.com/jonataslaw/VideoCompress.git ref: master

Hi, that solution produces the following warning:


Because project depends on stream_chat_flutter ^3.5.1 which depends on video_compress ^3.0.0, video_compress from hosted is required.
So, because project depends on video_compress from git, version solving failed.
pub get failed (1; So, because project depends on video_compress from git, version solving failed.)
Process finished with exit code 1
imtoori commented 2 years ago

@markfili the markdown formatting removed a very important line

dependency_overrides:
  video_compress:
      git:
        url: https://github.com/jonataslaw/VideoCompress.git
        ref: master

this is the right snippet

markfili commented 2 years ago

Great, works! thank you for the important line, now I know more!

GroovinChip commented 2 years ago

@markfili are you still experiencing this issue?

markfili commented 2 years ago

@GroovinChip well, the override made the warning go away and the project built normally, so I'd say no more issue (although I'd say that it would be better to handle it without the override but I understand why it won't be done)

GroovinChip commented 2 years ago

OK then, thank you for letting me know! If you have any further issues, please do let us know and we'll be more than happy to help out!

markfili commented 2 years ago

oh, ok, btw I'm not the OP

GroovinChip commented 2 years ago

Ah yes, looks like I mistyped. My apologies!

MikleJack commented 1 year ago

I found that by manually importing stream chat fluitter package and removing all dependencies related to video_compression can make the project run. I adopted this method because I was doing a temporary school homework,

The file is stream chat Flutter package, all vedio have been deleted_ Compress dependency

My English is machine translation, so it may not be fluent

------------------ 原始邮件 ------------------ 发件人: "GetStream/stream-chat-flutter" @.>; 发送时间: 2022年3月13日(星期天) 上午9:55 @.>; @.**@.>; 主题: Re: [GetStream/stream-chat-flutter] video_compress package kotlin gradle version error (Issue #939)

I also have the same issue. The only way it seems to solve the issue is if they stop using the plugin or if they get the plugin owner to update it.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

imtoori commented 1 year ago

hey @MikleJack we even removed video compression from v5 so you should be able to run it even without manually removing it