bluelinelabs / Conductor

A small, yet full-featured framework that allows building View-based Android applications
Apache License 2.0
3.9k stars 343 forks source link

[3.0.0-rc5] NoSuchMethodError: No static method metafactory #622

Closed danielocampo2 closed 4 years ago

danielocampo2 commented 4 years ago

Hi, when using the latest version (3.0.0-rc5 or 3.0.1-SNAPSHOT) I get the following exception when attaching the router:

java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.runtime/javalib/core-oj.jar)
        at com.bluelinelabs.conductor.Router.watchContainerAttach(Router.java:723)
        at com.bluelinelabs.conductor.ActivityHostedRouter.setHost(ActivityHostedRouter.java:36)
        at com.bluelinelabs.conductor.internal.LifecycleHandler.getRouter(LifecycleHandler.java:86)
        at com.bluelinelabs.conductor.Conductor.attachRouter(Conductor.kt:29)

I am using Kotlin 1.4.0-rc.

EricKuck commented 4 years ago

This has been fixed in 8575f534366a26230744ce98f6970f2a9e600fbc. I'm not sure what was causing it, but it was something with Java 8. We'll be moving more towards kotlin soon anyway, so this change wasn't needed.