Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

😱ERROR:java.lang.NoSuchFieldError: method resolution failed #275

Open
TommyTC opened this issue Mar 22, 2019 · 0 comments
Open

😱ERROR:java.lang.NoSuchFieldError: method resolution failed #275

TommyTC opened this issue Mar 22, 2019 · 0 comments

Comments

@TommyTC
Copy link

TommyTC commented Mar 22, 2019

Retrolambda:3.7.0

retrolambda {
        javaVersion JavaVersion.VERSION_1_7
        jvmArgs '-noverify'
        defaultMethods false
        incremental true
    }

Source code

public void createOptions(){
        ...
        optionsLayout.setOnCheckedChangeListener((group, checkedId) -> {
                View checked = group.findViewById(checkedId);
                if (checked == null){
                    return;
                }
                setDate((Date) checked.getTag());
        });
    }

Terminal

00:00 ERROR: Failed to run Retrolambda
java.lang.RuntimeException: Failed to backport class: com/wn/lib/ui/component/dialog/DatePickerDialogBuilder
        at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:129)
        at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:107)
        at net.orfjackal.retrolambda.Transformers.backportClass(Transformers.java:47)
        at net.orfjackal.retrolambda.Retrolambda.run(Retrolambda.java:83)
        at net.orfjackal.retrolambda.Main.main(Main.java:28)
Caused by: java.lang.RuntimeException: Failed to backport lambda or method reference: com/wn/lib/ui/component/dialog/DatePickerDialogBuilder.lambda$createOptions$0(Landroid/widget/RadioGroup;I)V (7)
        at net.orfjackal.retrolambda.lambdas.LambdaReifier.reifyLambdaClass(LambdaReifier.java:42)
        at net.orfjackal.retrolambda.lambdas.BackportLambdaInvocations$InvokeDynamicInsnConverter.backportLambda(BackportLambdaInvocations.java:187)
        at net.orfjackal.retrolambda.lambdas.BackportLambdaInvocations$InvokeDynamicInsnConverter.visitInvokeDynamicInsn(BackportLambdaInvocations.java:176)
        at net.orfjackal.retrolambda.asm.ClassReader.readCode(ClassReader.java:1519)
        at net.orfjackal.retrolambda.asm.ClassReader.readMethod(ClassReader.java:1032)
        at net.orfjackal.retrolambda.asm.ClassReader.accept(ClassReader.java:708)
        at net.orfjackal.retrolambda.asm.ClassReader.accept(ClassReader.java:521)
        at net.orfjackal.retrolambda.Transformers.lambda$transform$4(Transformers.java:107)
        at net.orfjackal.retrolambda.Transformers.transform(Transformers.java:125)
        ... 4 more
Caused by: java.lang.NoSuchMethodException: no such method: com.wn.lib.ui.component.dialog.DatePickerDialogBuilder.lambda$createOptions$0(RadioGroup,int)void/invokeSpecial
        at java.lang.invoke.MemberName.makeAccessException(MemberName.java:873)
        at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1005)
        at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1382)
        at java.lang.invoke.MethodHandles$Lookup.findSpecial(MethodHandles.java:1000)
        at net.orfjackal.retrolambda.lambdas.Types.toMethodHandle(Types.java:53)
        at net.orfjackal.retrolambda.lambdas.Types.asmToJdkType(Types.java:26)
        at net.orfjackal.retrolambda.lambdas.LambdaReifier.callBootstrapMethod(LambdaReifier.java:106)
        at net.orfjackal.retrolambda.lambdas.LambdaReifier.reifyLambdaClass(LambdaReifier.java:37)
        ... 12 more
Caused by: java.lang.NoSuchFieldError: method resolution failed
        at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
        at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:977)
        at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1002)
        ... 18 more

:lib.frame:transformClassesWithRetrolambdaForRelease (Thread[Task worker for ':' Thread 7,5,main]) completed. Took 0.495 secs.

FAILURE: Build failed with an exception.

Why Retrolambda don't generate backport class(AbstractPickerDialogBuilder$$lambda$1)?

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

No branches or pull requests

1 participant