Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

expo build errors for android (wrong kotlin version) #37

@jonasbetareader

Description

@jonasbetareader

Hello!

I love this package, been working great for me in a managed expo / eas build project. But with my latest update, it only builds fine on iOS. On Android, it I get the following error: "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."

Unsure of how to tackle this, any pointers would be much appreciated. Is there a way to override the kotlin version manually?

My package versions:

...
    "expo": "^46.0.13",
    "react-native-mlkit-ocr": "0.2.5",
...

The build error logs:

[stderr] e: /home/expo/.gradle/caches/transforms-3/0485c57e77da2d74e4400ab5f4119067/transformed/jetified-kotlin-stdlib-jdk8-1.6.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.6.0, expected version is 1.1.15.
[stderr] e: /home/expo/.gradle/caches/transforms-3/39ce31cacf59c39e98c8af78aab9d48a/transformed/jetified-react-native-0.69.6-release-api.jar!/META-INF/ReactAndroid_release.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.
[stderr] e: /home/expo/.gradle/caches/transforms-3/71974a8810180bf42d7354e2ae463e17/transformed/jetified-kotlin-stdlib-common-1.6.10.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.
[stderr] e: /home/expo/.gradle/caches/transforms-3/76ffa0bc7ee35e73adab5c035a9c7f86/transformed/jetified-kotlin-stdlib-jdk7-1.6.10.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.
[stderr] e: /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.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.
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (21, 17): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (26, 17): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (35, 17): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (37, 17): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (38, 11): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (41, 15): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (42, 9): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (48, 5): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (49, 19): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (50, 19): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (51, 19): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (52, 19): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (54, 19): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (55, 19): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (56, 19): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (57, 19): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (68, 16): Unresolved reference: forEach
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (68, 26): Cannot infer a type for this parameter. Please specify it explicitly.
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (70, 9): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (71, 9): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (72, 9): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (88, 13): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (89, 13): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (90, 13): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (91, 24): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (95, 11): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (96, 11): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (97, 11): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (98, 11): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (100, 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (106, 12): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (107, 12): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (108, 12): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (109, 12): 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.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/app/node_modules/react-native-mlkit-ocr/android/src/main/java/com/reactnativemlkitocr/MlkitOcrModule.kt: (110, 12): 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions