CCExtractor / beacon

Flutter application to share location with a group. (under development)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kotlin version needs to be updated for running with the latest Android Studio version in mac.

AliAkberAakash opened this issue · comments

Describe the bug
I tried to build the project for the first time and I had to update my Kotlin version in order for it to be built with the latest Android Studio Bumblebee 2021.1.1 Patch 2, in MacBook Pro 2018.

To Reproduce
Clone the project and try to build it with latest android studio version on a Mac device.

Expected behavior
Should build without any errors.

Demonstration
The stacktrace is given below:

`e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/bs274/.gradle/caches/transforms-2/files-2.1/171e1500458442395eb4d0e27159f105/jetified-kotlin-stdlib-jdk7-1.5.30.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.5.1, expected version is 1.1.15.
e: /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/bs274/.gradle/caches/transforms-2/files-2.1/4e97bf3751bce29d2cb909d2bceac7ec/jetified-window-java-1.0.0-beta04-api.jar!/META-INF/window-java_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/bs274/.gradle/caches/transforms-2/files-2.1/9899f0bcd1b48d1638dad0a704d8e64c/jetified-kotlinx-coroutines-core-jvm-1.5.2.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.5.1, expected version is 1.1.15.
e: /Users/bs274/.gradle/caches/transforms-2/files-2.1/a5125578e51506653ad3b9ef89b576c2/jetified-kotlinx-coroutines-android-1.5.2.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.5.1, expected version is 1.1.15.
e: /Users/bs274/.gradle/caches/transforms-2/files-2.1/b401c367bd52f7fec0add58c92f2bbc8/jetified-kotlin-stdlib-common-1.5.31.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.5.1, expected version is 1.1.15.
e: /Users/bs274/.gradle/caches/transforms-2/files-2.1/da7b41614df1aa3720c65f45c5507a75/jetified-window-1.0.0-beta04-api.jar!/META-INF/window_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
e: /Users/bs274/.gradle/caches/transforms-2/files-2.1/f4797d1ba9c9258b60bb9891270cb478/jetified-kotlin-stdlib-jdk8-1.5.30.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.5.1, expected version is 1.1.15.
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (24, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (25, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (26, 13): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (30, 13): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (31, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (35, 6): Class 'kotlin.jvm.JvmStatic' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/jvm/JvmStatic.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (38, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (43, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (45, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (47, 14): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (52, 21): Unresolved reference: hashMapOf
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (75, 28): Unresolved reference: forEach
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (76, 9): Val cannot be reassigned
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (76, 19): Function '' should return Unit to be used by corresponding operator '+='
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (76, 22): Unresolved reference: it
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (76, 46): Unresolved reference: it
e: /Users/bs274/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/android/src/main/kotlin/com/byneapp/flutter_config/FlutterConfigPlugin.kt: (79, 11): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/bs274/.gradle/caches/transforms-2/files-2.1/47f84ba3a238cd59ed816e07a457e15a/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':flutter_config:compileDebugKotlin'.

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 11s

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │
│ update /Users/bs274/flutter_projects/beacon/android/build.gradle: │
│ ext.kotlin_version = '' │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1`

Environment

  • Samsung M21
  • OS: Android 12
  • Flutter version: 2.10.3

Additional context

Are you working on this issue? (Yes/No)
yes

Duplicate of issue #118