Closed aawhitfield closed 2 years ago
Hey @aawhitfield !
Thanks for reaching out about this. The example project is quite outdated and will be deprecated in the near future. For more detailed example have a look at https://github.com/CodeMinion/Demo-Another-Brother-Prime instead.
Thanks again!
Thanks for the reply and the resource!
Anytime! Don't hesitate to reach out if you run into any other issues.
When I build example it says the following:
`` Launching lib\main.dart on SM F926U in debug mode... Running Gradle task 'assembleDebug'... e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.0/7857e365f925cfa060f941c1357cda1f8790502c/kotlin-stdlib-common-1.6.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.6.0, expected version is 1.1.15. e: C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.0/da6bdc87391322974a43ccc00a25536ae74dad51/kotlin-stdlib-jdk7-1.6.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.6.0, expected version is 1.1.15. e: C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.5.30/5fd47535cc85f9e24996f939c2de6583991481b0/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: C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.0/a40b8b22529b733892edf4b73468ce598bb17f04/kotlin-stdlib-1.6.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.6.0, expected version is 1.1.15. e: C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-android/1.5.2/d246a704a55b7bddb79407cce4348890eaa341d9/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: C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/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.
The class is loaded from C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/Dispatchers.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbSetupMethodCall.kt: (56, 37): Class 'kotlinx.coroutines.MainCoroutineDispatcher' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/MainCoroutineDispatcher.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbSetupMethodCall.kt: (58, 23): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.0/a40b8b22529b733892edf4b73468ce598bb17f04/kotlin-stdlib-1.6.0.jar!/kotlin/Unit.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (25, 9): Class 'kotlinx.coroutines.GlobalScope' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/GlobalScope.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (25, 21): Unresolved reference: launch e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (25, 28): Class 'kotlinx.coroutines.Dispatchers' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/Dispatchers.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (25, 40): Class 'kotlinx.coroutines.MainCoroutineDispatcher' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/MainCoroutineDispatcher.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (27, 32): Unresolved reference: HashMap e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (27, 69): Unresolved reference: HashMap e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (55, 17): Unresolved reference: withContext e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (55, 29): Class 'kotlinx.coroutines.Dispatchers' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/Dispatchers.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (55, 41): Class 'kotlinx.coroutines.MainCoroutineDispatcher' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/MainCoroutineDispatcher.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (57, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.0/a40b8b22529b733892edf4b73468ce598bb17f04/kotlin-stdlib-1.6.0.jar!/kotlin/Unit.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (64, 27): Unresolved reference: withContext e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (64, 39): Class 'kotlinx.coroutines.Dispatchers' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/Dispatchers.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (64, 51): Class 'kotlinx.coroutines.CoroutineDispatcher' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/CoroutineDispatcher.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (70, 17): Unresolved reference: withContext e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (70, 29): Class 'kotlinx.coroutines.Dispatchers' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/Dispatchers.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (70, 41): Class 'kotlinx.coroutines.MainCoroutineDispatcher' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/MainCoroutineDispatcher.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (72, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.0/a40b8b22529b733892edf4b73468ce598bb17f04/kotlin-stdlib-1.6.0.jar!/kotlin/Unit.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (79, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.0/a40b8b22529b733892edf4b73468ce598bb17f04/kotlin-stdlib-1.6.0.jar!/kotlin/Unit.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (80, 13): Unresolved reference: withContext e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (80, 25): Class 'kotlinx.coroutines.Dispatchers' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/Dispatchers.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (80, 37): Class 'kotlinx.coroutines.MainCoroutineDispatcher' 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 C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.5.2/f4cc07a50437659e0043e7da762809a46932b6a0/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/MainCoroutineDispatcher.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\method\typeb\TbStartCommunicationMethodCall.kt: (82, 23): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.0/a40b8b22529b733892edf4b73468ce598bb17f04/kotlin-stdlib-1.6.0.jar!/kotlin/Unit.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\receiver\UsbPermissionsReceiver.kt: (17, 17): Unresolved reference: let e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\receiver\UsbPermissionsReceiver.kt: (18, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15. The class is loaded from C:/Users/aawhi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.0/a40b8b22529b733892edf4b73468ce598bb17f04/kotlin-stdlib-1.6.0.jar!/kotlin/Unit.class e: C:\Users\aawhi\StudioProjects\another_brother\android\src\main\kotlin\com\rouninlabs\another_brother\receiver\UsbPermissionsReceiver.kt: (18, 66): Unresolved reference: it
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':another_brother:compileDebugKotlin'.
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 19s
┌─ 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 C:\Users\aawhi\StudioProjects\another_brother\example\android\build.gradle: │ │ ext.kotlin_version = '' │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1
``
I updated ext.kotlin_version to 1.6.20, which is the latest version, but the error persists. Tried flutter clean and restarting the IDE. Same error.