nandorojo / zeego

Menus for React (Native) done right.
https://zeego.dev
MIT License
1.45k stars 42 forks source link

Build error on Android for `react-native-ios-context-menu` #34

Closed thecoorum closed 1 year ago

thecoorum commented 1 year ago

Hey @nandorojo! First of all, thank you for one more amazing library. I understand that it's more like a wrapper around react-native-ios-context-menu, but while using zeego with expo and EAS, I'm facing issue while building any releases (both development and production). I created an issue (link) on the original library repo, but no answer was received. Maybe you faced an issue during development?

Stack trace

[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/2cfe106a332c6a6f2245988cf5920bcb/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/8fa201288e2c6500b9e1af2f8ed9c77c/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/b6d16718b0badf943a01bd505b26edc1/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/d3fc290c9b603f2d0c573f31aa64957d/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/ef154a7ff5c9e83f423d62f01250b0da/transformed/jetified-react-native-0.70.5-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/workingdir/build/node_modules/react-native-ios-context-menu/android/src/main/java/com/reactnativeioscontextmenu/IosContextMenuPackage.kt: (11, 16): Unresolved reference: emptyList
[stderr] e: /home/expo/workingdir/build/node_modules/react-native-ios-context-menu/android/src/main/java/com/reactnativeioscontextmenu/IosContextMenuPackage.kt: (15, 16): Unresolved reference: listOf
[stderr] e: /home/expo/workingdir/build/node_modules/react-native-ios-context-menu/android/src/main/java/com/reactnativeioscontextmenu/IosContextMenuViewManager.kt: (18, 10): 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/d3fc290c9b603f2d0c573f31aa64957d/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class

And the following trace in summary

[stderr] FAILURE: Build completed with 2 failures.
[stderr] 1: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] Execution failed for task ':react-native-ios-context-menu:compileDebugKotlin'.
[stderr] > Compilation error. See log for more details
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.

Updating project's kotlin version to 1.6.0 gave no result

nandorojo commented 1 year ago

This looks like an Android issue. Can you try removing react-native-ios-context-menu on Android in react-native.config.js?

thecoorum commented 1 year ago

Yep, that's helped. Thanks a lot!