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
937 stars 342 forks source link

Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. #2002

Closed Rioland closed 2 months ago

Rioland commented 3 months ago

Which packages are you using?

stream_chat_flutter, stream_chat_flutter_core

On what platforms did you experience the issue?

iOS, Android

What version are you using?

stream_chat_flutter: ^8.0.0

What happened?

i added the stream_chat_flutter: ^8.0.0 and i want to build and run the project and i got lot of errors.

create a new project with: android studio koala Android sdk 34 or latest flutter sdk 3.24.0 dart sdk 3.5**

Steps to reproduce

1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
...

Supporting info to reproduce

No response

Relevant log output

Warning: This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
e: /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
e: /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (22, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (23, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (24, 25): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (28, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (29, 25): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (30, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (34, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (35, 13): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (43, 31): Unresolved reference: HashMap
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (45, 21): Unresolved reference: put
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (46, 21): Unresolved reference: put
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (47, 21): Unresolved reference: put
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (48, 21): Unresolved reference: put
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (49, 49): Unresolved reference: put
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (50, 51): Unresolved reference: put
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (51, 26): Cannot infer a type for this parameter. Please specify it explicitly.
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (52, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (55, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (58, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (72, 14): Class 'kotlin.Suppress' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Suppress.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (77, 6): Class 'kotlin.Suppress' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Suppress.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (86, 6): Class 'kotlin.Suppress' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Suppress.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (97, 70): Unresolved reference: first
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (99, 77): Unresolved reference: first
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (108, 32): Unresolved reference: isNullOrEmpty
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (108, 62): Unresolved reference: first
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (111, 50): Unresolved reference: first
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (122, 6): Class 'kotlin.jvm.Throws' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/jvm/Throws.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (125, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (137, 25): Unresolved reference: indices
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (139, 13): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (140, 13): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /Users/cleaques_sys1/.gradle/caches/transforms-3/46b8ba00727ea3a14b77993d4d0757ad/transformed/jetified-kotlin-stdlib-2.0.10.jar!/kotlin/Unit.class
e: /Users/cleaques_sys1/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/android/src/main/kotlin/dev/fluttercommunity/plus/packageinfo/PackageInfoPlugin.kt: (142, 23): Too many arguments for public constructor String() defined in kotlin.String

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':package_info_plus:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > 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 10s

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin.                       │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then   │
│ update the                                                                                   │
│ version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of  │
│ /Users/cleaques_sys1/Documents/sreamchat/android/settings.gradle.                            │
│                                                                                              │
│ Alternatively (if your project was created before Flutter 3.19), update                      │
│ /Users/cleaques_sys1/Documents/sreamchat/android/build.gradle                                │
│ ext.kotlin_version = '<latest-version>'                                                      │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

Flutter analyze output

info • The file name 'listchatViewpage.dart' isn't a lower_case_with_underscores identifier • lib/getStream/listchatViewpage.dart:1:1 • file_names
warning • Unused import: 'package:stream_chat_flutter/stream_chat_flutter.dart' • lib/main.dart:2:8 • unused_import
   info • The private field _counter could be 'final' • lib/main.dart:62:7 • prefer_final_fields

Flutter doctor output

cleaques_sys1@CLEAQUESs-MacBook-Pro sreamchat % flutter doctor -v
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-NG)
    • Flutter version 3.24.0 on channel stable at /Library/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (3 weeks ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/cleaques_sys1/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2024.1)
    • 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 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.91.1)
    • VS Code at /Users/cleaques_sys1/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.94.0

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554                        • android-arm64 • Android 14 (API 34) (emulator)
    • iPhone 15 Pro (mobile)          • C0AB0B0A-04F0-490A-B4DF-D5E224E832DA • ios           • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64  • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin        • macOS 14.5 23F79 darwin-arm64

[!] Network resources                                  
    ✗ A network error occurred while checking "https://maven.google.com/": Failed host lookup: 'maven.google.com'
    ✗ A network error occurred while checking "https://cocoapods.org/": Failed host lookup: 'cocoapods.org'

! Doctor found issues in 3 categories.

Code of Conduct

Rioland commented 3 months ago

this stream_chat_flutter: ^8.0.0 gave me the error

deven98 commented 3 months ago

Hi @Rioland, I'm not perfectly sure this error comes from our end.

Can you please change your kotlin plugin version and try again?

deven98 commented 2 months ago

I am closing this issue for now since I do not think it originates from the SDK. If there are any updates here, feel free to open another issue about the same.

Thanks!