Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible version of Kotlin on compilation #1393

Closed
2 tasks done
as-85 opened this issue Jan 20, 2023 · 9 comments
Closed
2 tasks done

Incompatible version of Kotlin on compilation #1393

as-85 opened this issue Jan 20, 2023 · 9 comments
Labels
bug platform-android Affects the android platform

Comments

@as-85
Copy link

as-85 commented Jan 20, 2023

Checklist

  • I read the troubleshooting guide before raising this issue
  • I made sure that the issue I am raising doesn't already exist

Current bug behaviour

When compiling, many of these errors are displayed.

e: /Users/./StudioProjects/./build/audioplayers_android/.transforms/255311182dafdd6ac4eb63a5bb962d32/transformed/out/jars/classes.jar!/META-INF/audioplayers_android_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/./StudioProjects/./build/volume_controller/.transforms/fd9215dff063f50e68dfae64139c2d8c/transformed/out/jars/classes.jar!/META-INF/volume_controller_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/./StudioProjects/./build/package_info_plus/.transforms/79453a5a4234b228dfa8e31803b7fca3/transformed/out/jars/classes.jar!/META-INF/package_info_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/./StudioProjects/./build/fluttertoast/.transforms/2ca7d08035b3ebb8fc9a6b18ef5341d7/transformed/out/jars/classes.jar!/META-INF/fluttertoast_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/./.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.7.10/d70d7d2c56371f7aa18f32e984e3e2e998fe9081/kotlin-stdlib-jdk8-1.7.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.7.1, expected version is 1.5.1.
e: /Users/./.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation/1.5.0/857678d6b4ca7b28571ef7935c668bdb57e15027/annotation-1.5.0.jar!/META-INF/annotation.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/./.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.7.21/a0ba09615c2213d580315e234b3febfea25b757e/kotlin-stdlib-jdk7-1.7.21.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.7.1, expected version is 1.5.1.
e: /Users/./.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.7.21/1a2eaf898a0dda83037034b10a42053cf8a7caf8/kotlin-stdlib-1.7.21.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: /Users/./.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.7.21/cb02257de8e13e8498f8e2f69f742f2d438e794d/kotlin-stdlib-common-1.7.21.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.

Expected behaviour

Steps to reproduce

Code sample

Logs

Full Logs Flutter doctor:
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-x64, locale de-DE)
    • Flutter version 3.3.10 on channel stable at /Library/Flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (5 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/andreas/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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.13+0-b1751.21-8125866)

[✓] VS Code (version 1.75.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • TB132FU (mobile) • HA1RNFWK • android-arm64  • Android 12 (API 31)
    • macOS (desktop)  • macos    • darwin-x64     • macOS 13.1 22C65 darwin-x64
    • Chrome (web)     • chrome   • web-javascript • Google Chrome 109.0.5414.87

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

• No issues found!

Audio Files/URLs/Sources

Screenshots

Environment information

  • audioplayers version: 2.0.0

Platform 1: android

  • OS name and version: 12
  • Device: Lenovo Tab P11 Pro Gen 2
  • build mode: release
  • error peculiarities (optional):
  • Platforms tested without any issue (optional):

More information

@as-85 as-85 added the bug label Jan 20, 2023
@Gustl22 Gustl22 added the platform-android Affects the android platform label Jan 21, 2023
@Gustl22
Copy link
Collaborator

Gustl22 commented Jan 21, 2023

What kotlin_version do you have in your build.gradle? Doesn't seem to be related to audioplayers as other packages are also marked as incompatible. It seems that your app uses an outdated one.

@Gustl22 Gustl22 added the changes-requested The issue or merge request doesn't fulfill the conventions and has to be changed by the author label Jan 21, 2023
@as-85
Copy link
Author

as-85 commented Jan 22, 2023

I use the version 1.7.10

@Gustl22 Gustl22 removed the changes-requested The issue or merge request doesn't fulfill the conventions and has to be changed by the author label Jan 22, 2023
@Gustl22
Copy link
Collaborator

Gustl22 commented Jan 22, 2023

@as-85
Copy link
Author

as-85 commented Jan 22, 2023

I did not write that it does not work. I only pointed out the errors that are displayed during the build process. The function is fine.

If source code can help, I'm happy to provide some.

@Gustl22
Copy link
Collaborator

Gustl22 commented Jan 22, 2023

If the example app does not give this warning, it most likely is a fault in your app. Otherwise you can share your project code if you want.

@as-85
Copy link
Author

as-85 commented Jan 22, 2023

Trying it out.

@Gustl22
Copy link
Collaborator

Gustl22 commented Jan 28, 2023

@as-85 did you test? Thx

@Gustl22 Gustl22 added the changes-requested The issue or merge request doesn't fulfill the conventions and has to be changed by the author label Jan 28, 2023
@as-85
Copy link
Author

as-85 commented Feb 1, 2023

With the sample project, I get the following error message during the build:

Warning: The plugin file_picker requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to /Users/andreas/Downloads/test/packages/audioplayers/example/android/app/build.gradle:
android {
  compileSdkVersion 33
  ...
}

But the build still works.

@Gustl22 Gustl22 removed the changes-requested The issue or merge request doesn't fulfill the conventions and has to be changed by the author label Feb 1, 2023
@Gustl22
Copy link
Collaborator

Gustl22 commented Feb 14, 2023

So the kotlin thing is definitely something you need to change in your app in the build.gradle file. Like done in our example app.

Regarding the compileSdk, we needed to wait for Flutter to officially support API 33, which is now the case. This will be fixed in the an upcoming release, see #1364

@Gustl22 Gustl22 closed this as completed Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug platform-android Affects the android platform
Projects
None yet
Development

No branches or pull requests

2 participants