Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

[Expo v46] sovran-react-native causes Android builds to fail on the latest version of Expo v46.0.0 #39

Open
conoremclaughlin opened this issue Aug 8, 2022 · 4 comments

Comments

@conoremclaughlin
Copy link

conoremclaughlin commented Aug 8, 2022

We're only including this library because it's required for analytics-react-native.

package.json

"@segment/analytics-react-native": "^2.5.1",
"@segment/sovran-react-native": "^0.2.8",

build log for expo run:android

> Task :segment_sovran-react-native:compileDebugKotlin FAILED
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/conormclaughlin/.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.
e: /Users/conormclaughlin/.gradle/caches/transforms-3/2b1e08bafb4c18e3a65e31a103ca884b/transformed/jetified-react-native-0.69.3-debug-api.jar!/META-INF/ReactAndroid_debug.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: /Users/conormclaughlin/.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.
e: /Users/conormclaughlin/.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.
e: /Users/conormclaughlin/.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.
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (14, 23): Unresolved reference: mutableListOf
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (18, 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.
The class is loaded from /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (20, 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.
The class is loaded from /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (22, 7): 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 /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (24, 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.
The class is loaded from /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (24, 26): Unresolved reference: it
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (24, 35): Unresolved reference: it
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (29, 12): Unresolved reference: listOf
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (34, 12): Unresolved reference: emptyList
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (39, 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.
The class is loaded from /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (40, 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.
The class is loaded from /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (15, 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 /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (25, 33): Unresolved reference: mapOf
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (26, 25): Unresolved reference: to
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (30, 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.
The class is loaded from /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (31, 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.
The class is loaded from /Users/conormclaughlin/.gradle/caches/transforms-3/f9a6c4180d9d810f143b823eeeb39ba3/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (47, 15): Unresolved reference: mapOf
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (48, 16): Unresolved reference: to
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (49, 19): Unresolved reference: to
e: /Users/conormclaughlin/ws/inkah/packages/mobile/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (52, 97): Unresolved reference: java
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

Any assistance would be magnificently appreciated! Everything was working fine on v45. All other libraries are working fine.

@hridoy43
Copy link

hridoy43 commented Aug 9, 2022

I'm also facing the same issue with (with SDK46) EAS Build.

here's the build log -

`

Task :segment_sovran-react-native:generateDebugBuildConfig
[stderr]
Note: Some input files use or override a deprecated API.
[stderr]
Note: Recompile with -Xlint:deprecation for details.
[stderr]
Note: /home/expo/workingdir/build/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java uses unchecked or unsafe operations.
[stderr]
Note: Recompile with -Xlint:unchecked for details.
Task :segment_sovran-react-native:compileDebugKotlin FAILED
[stderr]
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
[stderr]
e: /home/expo/.gradle/caches/transforms-3/30f452c1dba5384c6f1f8fc1e5af5428/transformed/jetified-react-native-0.69.4-debug-api.jar!/META-INF/ReactAndroid_debug.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/6029b77fa6af2a2f0aabab9ee1c41690/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/6f9db9a6c502a72df525c1c7139d6b99/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/aca87ee4c8f09b839e54e7d34e080cfc/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/.gradle/caches/transforms-3/adfbe3bd633d0b66dd3099e4742b66bc/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/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (14, 23): Unresolved reference: mutableListOf
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (18, 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/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (20, 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/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (22, 7): 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/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (24, 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/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (24, 26): Unresolved reference: it
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (24, 35): Unresolved reference: it
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (29, 12): Unresolved reference: listOf
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (34, 12): Unresolved reference: emptyList
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (39, 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/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/Sovran.kt: (40, 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/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (15, 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.
[stderr]
The class is loaded from /home/expo/.gradle/caches/transforms-3/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (25, 33): Unresolved reference: mapOf
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (26, 25): Unresolved reference: to
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (30, 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/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (31, 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/aca87ee4c8f09b839e54e7d34e080cfc/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (47, 15): Unresolved reference: mapOf
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (48, 16): Unresolved reference: to
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (49, 19): Unresolved reference: to
[stderr]
e: /home/expo/workingdir/build/node_modules/@segment/sovran-react-native/android/src/main/java/com/reactnativesovran/SovranModule.kt: (52, 97): Unresolved reference: java
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 13 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
847 actionable tasks: 847 executed
Unable to list file systems to check whether they can be watched. The whole state of the virtual file system has been discarded. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory)
[stderr]
FAILURE: Build failed with an exception.
[stderr]

  • What went wrong:
    [stderr]
    Execution failed for task ':segment_sovran-react-native:compileDebugKotlin'.
    `

@zhigang1992
Copy link

You can fix it by setting kotlinVersion in the project's build.gradle to 1.6.0

@MorenoMdz
Copy link

You can fix it by setting kotlinVersion in the project's build.gradle to 1.6.0

But that requires a config plugin right, we don't need it otherwise.

@GregAtFramework
Copy link

I was able to get this library to work on the Expo managed workflow under SDK 46.

I set kotlinVersion: "1.6.10" using expo-build-properties.

This is with package versions:

    "@segment/analytics-react-native": "2.1.12",
    "@segment/sovran-react-native": "0.2.4",

I tried updating these packages, and had issues. But I can't remember exactly what, and am not in the mood to experiment!

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

No branches or pull requests

5 participants