Driversnote-Dev / react-native-helpscout-beacon

Integrate the Helpscout Beacon in to you React Native app
10 stars 4 forks source link

[Android] App crashes: java.lang.NoSuchMethodError: No static method koinApplication(Lkotlin/jvm/functions/Function1;) #21

Open ilyagru opened 3 days ago

ilyagru commented 3 days ago

If I add this library, the app crashes on launch. Everything is fine on iOS.

It might be related to https://github.com/expo/expo/issues/29047.

FATAL EXCEPTION: main
  Process: app, PID: 25877
  java.lang.NoSuchMethodError: No static method koinApplication(Lkotlin/jvm/functions/Function1;)Lorg/koin/core/KoinApplication; in class Lorg/koin/dsl/KoinApplicationKt; or its super classes (declaration of 'org.koin.dsl.KoinApplicationKt' appears in /data/app/~~JbxgbEkaPG8LrM5YBSjiIA==/app-eptDv5N7AIY6ymGpqln4-w==/base.apk!classes8.dex)
    at expo.modules.devlauncher.koin.DevLauncherKoinAppKt$koinAppFactory$1.invoke(DevLauncherKoinApp.kt:29)
    at expo.modules.devlauncher.koin.DevLauncherKoinAppKt$koinAppFactory$1.invoke(DevLauncherKoinApp.kt:28)
    at expo.modules.devlauncher.koin.DevLauncherKoinContext.<clinit>(DevLauncherKoinApp.kt:35)
    at expo.modules.devlauncher.DevLauncherController$Companion.wasInitialized(DevLauncherController.kt:382)
    at expo.modules.devlauncher.launcher.DevLauncherReactNativeHostHandler.getUseDeveloperSupport(DevLauncherReactNativeHostHandler.kt:22)
    at expo.modules.ReactNativeHostWrapperBase$getUseDeveloperSupport$1.invoke(ReactNativeHostWrapperBase.kt:72)
    at expo.modules.ReactNativeHostWrapperBase$getUseDeveloperSupport$1.invoke(ReactNativeHostWrapperBase.kt:72)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
    at kotlin.sequences.SequencesKt___SequencesKt.firstOrNull(_Sequences.kt:168)
    at expo.modules.ReactNativeHostWrapperBase.getUseDeveloperSupport(ReactNativeHostWrapperBase.kt:73)
    at expo.modules.ExpoReactHostFactory.createFromReactNativeHost(ExpoReactHostFactory.kt:93)
    at expo.modules.ReactNativeHostWrapper$Companion.createReactHost(ReactNativeHostWrapper.kt:53)
    at app.MainApplication.getReactHost(MainApplication.kt:39)
    at expo.modules.devlauncher.DevLauncherController$Companion.initialize(DevLauncherController.kt:430)
    at expo.modules.devlauncher.DevLauncherController$Companion.initialize$default(DevLauncherController.kt:429)
    at expo.modules.devlauncher.DevLauncherPackageDelegate$createApplicationLifecycleListeners$1.onCreate(DevLauncherPackageDelegate.kt:38)
    at expo.modules.ApplicationLifecycleDispatcher.onApplicationCreate(ApplicationLifecycleDispatcher.kt:20)
    at app.MainApplication.onCreate(MainApplication.kt:48)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1316)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6998)
    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2236)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8177)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

Versions

    "expo": "~51.0.34",
    "expo-dev-client": "~4.0.29",
    "react-native": "0.74.5",
    "react-native-helpscout-beacon": "^0.6.0",
ilyagru commented 14 hours ago

Forcing koin:3.5.6 doesn't help

https://slack-chats.kotlinlang.org/t/16047047/hello-guys-i-m-trying-to-update-koin-from-3-3-0-to-3-5-0-in-