fluttercommunity / wakelock_plus

Flutter plugin that allows you to keep the device screen awake on Android, iOS, macOS, Windows, Linux, and web.
BSD 3-Clause "New" or "Revised" License
49 stars 38 forks source link

Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. #29

Closed mtiendat closed 3 months ago

mtiendat commented 3 months ago

I got this issue after flutter flutter run --release app/build/wakelock_plus/.transforms/50c813c3096ff1c3249f9ed8688db469/transformed/out/jars/classes.jar!/META-INF/wakelock_plus_release.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.6.0.

kotlin verison: 1.9.0 [✓] Flutter (Channel stable, 3.16.7, on macOS 14.2.1 23C71 darwin-arm64, locale en-VN) • Flutter version 3.16.7 on channel stable at /opt/homebrew/Caskroom/flutter/3.3.8/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ef1af02aea (10 weeks ago), 2024-01-11 15:19:26 -0600 • Engine revision 4a585b7929 • Dart version 3.2.4 • DevTools version 2.28.5

patelnirav48 commented 3 months ago

Same issue facing on my end too while creating release build

mtiendat commented 3 months ago

Same issue facing on my end too while creating release build

I found a way. I tried downgrade version kotlin to 1.8.0, changed version com.android.tools.build:gradle to 7.4.2 and jvmTarget="11" to resolve this problem. you can try

diegotori commented 3 months ago

PR #34, which addresses this issue, was merged yesterday.

I will be releasing a new version either end of day today or tomorrow.

diegotori commented 3 months ago

Addressed in version 1.2.0.