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

can't use the new version 7.0.0 #969

Open
robertoalvarezjunior opened this issue Jul 21, 2024 · 9 comments
Open

can't use the new version 7.0.0 #969

robertoalvarezjunior opened this issue Jul 21, 2024 · 9 comments

Comments

@robertoalvarezjunior
Copy link

I installed the new version 7.0.0, and it's giving these errors when I try to run the app

I've tried changing the Kotlin version to 2.0.0, the latest, and the same error remains

Flutter run error Launching lib\main.dart on sdk gphone x86 in debug mode... e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: C:/Users/rober/.gradle/caches/transforms-3/070b8c3c028f5d94b4ee8995b691bb33/transformed/jetified-play-services-location-21.2.0-api.jar!/META-INF/java.com.google.android.gms.libs.identity_identity.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: C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.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: C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.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: C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.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: C:/Users/rober/.gradle/caches/transforms-3/27829993d30b7d9eed19c6c639d4d12f/transformed/jetified-kotlin-stdlib-common-1.9.0.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.9.0, expected version is 1.7.1. e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (48, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (75, 15): Unresolved reference: apply e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (76, 17): Unresolved reference: lockscreenVisibility e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (78, 33): Overload resolution ambiguity: public open fun createNotificationChannel(p0: NotificationChannel): Unit defined in androidx.core.app.NotificationManagerCompat public open fun createNotificationChannel(p0: NotificationChannelCompat): Unit defined in androidx.core.app.NotificationManagerCompat e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (86, 54): Unresolved reference: let e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (87, 17): Unresolved reference: it e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (87, 26): Unresolved reference: it e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (89, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (91, 14): Overload resolution ambiguity: public open fun setSmallIcon(p0: IconCompat): NotificationCompat.Builder defined in androidx.core.app.NotificationCompat.Builder public open fun setSmallIcon(p0: Int): NotificationCompat.Builder defined in androidx.core.app.NotificationCompat.Builder e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (95, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (101, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (109, 33): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (115, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (118, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (120, 14): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (124, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (169, 15): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (172, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (173, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (193, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (194, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (196, 15): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (201, 23): Unresolved reference: let e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (203, 21): Unresolved reference: it e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (214, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (215, 23): Unresolved reference: let e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (216, 32): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (217, 21): Unresolved reference: it e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (227, 23): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (229, 18): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (242, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (244, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (250, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (251, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (253, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Suppress.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (254, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (257, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (261, 33): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (264, 13): Unresolved reference: mapOf e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (264, 31): Unresolved reference: to e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (264, 63): Unresolved reference: to e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (271, 14): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (272, 19): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (279, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (281, 17): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (282, 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (283, 17): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (285, 17): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (286, 29): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (292, 29): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (294, 17): 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 C:/Users/rober/.gradle/caches/transforms-3/0b3d1ac2a41df065b440d0de0cc82f99/transformed/jetified-kotlin-stdlib-1.9.0.jar!/kotlin/Unit.class e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (302, 23): Unresolved reference: let e: C:\Users\rober\AppData\Local\Pub\Cache\hosted\pub.dev\location-7.0.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (303, 69): Unresolved reference: it

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':location: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.

BUILD FAILED in 8s
Running Gradle task 'assembleDebug'... 8,8s

┌─ 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 │
│ C:\Projetos\app_compras_anotacoes\android\settings.gradle. │
│ │
│ Alternatively (if your project was created before Flutter 3.19), update │
│ C:\Projetos\app_compras_anotacoes\android\build.gradle │
│ ext.kotlin_version = '' │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1

android>settings.gradle pluginManagement { def flutterSdkPath = { def properties = new Properties() file("local.properties").withInputStream { properties.load(it) } def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath }()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
    google()
    mavenCentral()
    gradlePluginPortal()
}

}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}

include ":app"

Flutter doctor -v [✓] Flutter (Channel stable, 3.22.3, on Microsoft Windows [versÆo 10.0.22631.3880], locale pt-BR) • Flutter version 3.22.3 on channel stable at C:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision b0850beeb2 (5 days ago), 2024-07-16 21:43:41 -0700 • Engine revision 235db911ba • Dart version 3.4.4 • DevTools version 2.34.3

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\rober\AppData\Local\Android\sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
• All Android licenses accepted.

[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.2)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.10.35004.147
• Windows 10 SDK version 10.0.22621.0

[!] Android Studio (version 2022.3)
• Android Studio at C:\Program Files\Android\Android Studio
• 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
✗ Unable to determine bundled Java version.
• Try updating or re-installing Android Studio.

[✓] Android Studio (version 2024.1)
• Android Studio at C:\Program Files\Android\Android Studio1
• 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--11852314)

[✓] VS Code (version 1.91.1)
• VS Code at C:\Users\rober\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.92.0

[✓] Connected device (4 available)
• sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [versÆo 10.0.22631.3880]
• Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.127
• Edge (web) • edge • web-javascript • Microsoft Edge 126.0.2592.113

[✓] Network resources
• All expected network resources are available.

! Doctor found issues in 1 category.

@abhaybissa31
Copy link

Same problem with me, did you find any solutions? I have been trying from past 5hrs. And even if you change versions, It messes up whole of the project

@Do-Repo
Copy link

Do-Repo commented Jul 22, 2024

Is it this problem you're having?

 What went wrong:
A problem occurred evaluating project ':location'.
> Could not get unknown property 'kotlin_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* 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 36s

@robertoalvarezjunior
Copy link
Author

Is it this problem you're having?

 What went wrong:
A problem occurred evaluating project ':location'.
> Could not get unknown property 'kotlin_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* 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 36s
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':location: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 8s
Running Gradle task 'assembleDebug'... 8,8s

@Linxford
Copy link

same issue here

@abhaybissa31
Copy link

So i was having the same issue earlier, for anyone facing the same issue, you just have to update the kotlin version of your project. Below are the steps:

  1. Goto settings.gradle
  2. find plugin block
  3. find the following line: id "org.jetbrains.kotlin.android" version "1.7.6" apply false
  4. replace the version with the latest stable version, in my case i updated to 2.0.0. here is what it looks like: id "org.jetbrains.kotlin.android" version "2.0.0" apply false
  5. Use flutter clean and flutter pub get command

React to the comment if it helps, or reach me out if you need further help.

@robertoalvarezjunior
Copy link
Author

So i was having the same issue earlier, for anyone facing the same issue, you just have to update the kotlin version of your project. Below are the steps:

  1. Goto settings.gradle
  2. find plugin block
  3. find the following line: id "org.jetbrains.kotlin.android" version "1.7.6" apply false
  4. replace the version with the latest stable version, in my case i updated to 2.0.0. here is what it looks like: id "org.jetbrains.kotlin.android" version "2.0.0" apply false
  5. Use flutter clean and flutter pub get command

React to the comment if it helps, or reach me out if you need further help.

It only generates the APK if the version is 2.0.0, and even then it shows this message during build

settings.gradle pluginManagement { def flutterSdkPath = { def properties = new Properties() file("local.properties").withInputStream { properties.load(it) } def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath }()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
    google()
    mavenCentral()
    gradlePluginPortal()
}

}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}

include ":app"

PS C:\Projetos\location_teste> flutter build apk

Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1384 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
e: C:/Projetos/location_teste/build/location/.transforms/20a94d66c859ebfdbf165e3bb3dfeb57/transformed/out/jars/classes.jar!/META-INF/location_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.9999, expected version is 1.6.0.
e: C:/Users/rober/.gradle/caches/transforms-3/15c724c072cd2149ae0083c736805fb3/transformed/jetified-play-services-location-21.2.0/jars/classes.jar!/META-INF/java.com.google.android.gms.libs.identity_identity.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.
e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.7.3/2b09627576f0989a436a00a4a54b55fa5026fb86/kotlinx-coroutines-core-jvm-1.7.3.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-android/1.7.3/38d9cad3a0b03a10453b56577984bdeb48edeed5/kotlinx-coroutines-android-1.7.3.jar!/META-INF/kotlinx-coroutines-android.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
6.0.
e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation-jvm/1.6.0/a7257339a052df0f91433cf9651231bbb802b502/annotation-jvm-1.6.0.jar!/META-INF/annotation.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/2.0.0/b48df2c4aede9586cc931ead433bc02d6fd7879e/kotlin-stdlib-2.0.0.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.6.0.
e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/2.0.0/b48df2c4aede9586cc931ead433bc02d6fd7879e/kotlin-stdlib-2.0.0.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.6.0.
e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/2.0.0/b48df2c4aede9586cc931ead433bc02d6fd7879e/kotlin-stdlib-2.0.0.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.6.0.
Running Gradle task 'assembleRelease'... 45,2s
√ Built build\app\outputs\flutter-apk\app-release.apk (18.0MB)

@abhaybissa31
Copy link

So i was having the same issue earlier, for anyone facing the same issue, you just have to update the kotlin version of your project. Below are the steps:

  1. Goto settings.gradle
  2. find plugin block
  3. find the following line: id "org.jetbrains.kotlin.android" version "1.7.6" apply false
  4. replace the version with the latest stable version, in my case i updated to 2.0.0. here is what it looks like: id "org.jetbrains.kotlin.android" version "2.0.0" apply false
  5. Use flutter clean and flutter pub get command

React to the comment if it helps, or reach me out if you need further help.

It only generates the APK if the version is 2.0.0, and even then it shows this message during build

settings.gradle
PS C:\Projetos\location_teste> flutter build apk
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1384 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. e: C:/Projetos/location_teste/build/location/.transforms/20a94d66c859ebfdbf165e3bb3dfeb57/transformed/out/jars/classes.jar!/META-INF/location_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.9999, expected version is 1.6.0. e: C:/Users/rober/.gradle/caches/transforms-3/15c724c072cd2149ae0083c736805fb3/transformed/jetified-play-services-location-21.2.0/jars/classes.jar!/META-INF/java.com.google.android.gms.libs.identity_identity.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. e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.7.3/2b09627576f0989a436a00a4a54b55fa5026fb86/kotlinx-coroutines-core-jvm-1.7.3.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-android/1.7.3/38d9cad3a0b03a10453b56577984bdeb48edeed5/kotlinx-coroutines-android-1.7.3.jar!/META-INF/kotlinx-coroutines-android.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. 6.0. e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation-jvm/1.6.0/a7257339a052df0f91433cf9651231bbb802b502/annotation-jvm-1.6.0.jar!/META-INF/annotation.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/2.0.0/b48df2c4aede9586cc931ead433bc02d6fd7879e/kotlin-stdlib-2.0.0.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.6.0. e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/2.0.0/b48df2c4aede9586cc931ead433bc02d6fd7879e/kotlin-stdlib-2.0.0.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.6.0. e: C:/Users/rober/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/2.0.0/b48df2c4aede9586cc931ead433bc02d6fd7879e/kotlin-stdlib-2.0.0.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.6.0. Running Gradle task 'assembleRelease'... 45,2s √ Built build\app\outputs\flutter-apk\app-release.apk (18.0MB)

error means a library in your project was built with a different Kotlin version than what your project expects (1.6.0 in this case). Now to remove the error, you can perform following steps, and then I guess it would work:

  1. Make sure that you have made changes in both of the build.gradle file, i.e. the root build.gradle and the build.gradle file within the app module.

2)Sync your project with gradle files, to do that in vscode, simple press ctrl+shift+p then select
image. Android studio also have this feature but i don't remember the exact steps to do so.

  1. Clean and rebuild the project using:
    flutter clean
    flutter pub get
    flutter build apk

  2. Invalidate caches: (direct option only available in android studio) File -> Invalidate Caches / Restart
    if you dont have android studio then try c -> users -> pcname -> .gradle -> caches then delete the versions folder like 7.6.3
    and then restart your ide

  3. if problem persist try rebuilding project once again after invalidating cache.

hope it helps

@robbitancor
Copy link

So i was having the same issue earlier, for anyone facing the same issue, you just have to update the kotlin version of your project. Below are the steps:

  1. Goto settings.gradle
  2. find plugin block
  3. find the following line: id "org.jetbrains.kotlin.android" version "1.7.6" apply false
  4. replace the version with the latest stable version, in my case i updated to 2.0.0. here is what it looks like: id "org.jetbrains.kotlin.android" version "2.0.0" apply false
  5. Use flutter clean and flutter pub get command

React to the comment if it helps, or reach me out if you need further help.

this works for me. thanks.

@tayadepritam0
Copy link

So i was having the same issue earlier, for anyone facing the same issue, you just have to update the kotlin version of your project. Below are the steps:

  1. Goto settings.gradle
  2. find plugin block
  3. find the following line: id "org.jetbrains.kotlin.android" version "1.7.6" apply false
  4. replace the version with the latest stable version, in my case i updated to 2.0.0. here is what it looks like: id "org.jetbrains.kotlin.android" version "2.0.0" apply false
  5. Use flutter clean and flutter pub get command

React to the comment if it helps, or reach me out if you need further help.

this works for me. thanks.

Mannn Huge respect buddy ,
You saved my life 💞
Love from india brother 🙌🚀🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants