monkeyWie / proxyee

HTTP proxy server,support HTTPS&websocket.MITM impl,intercept and tamper HTTPS traffic.
MIT License
1.52k stars 567 forks source link

java.lang.NoSuchMethodError #105

Closed Rich2020 closed 3 years ago

Rich2020 commented 3 years ago

I have imported proxee to new app and added the code from the example, but when I launch, I get an exception:


D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.cambridge.proxeeapp, PID: 20434
    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.github.monkeywie.proxyee.crt.CertUtil.getSubject(CertUtil.java:180)
        at com.github.monkeywie.proxyee.server.HttpProxyServer.init(HttpProxyServer.java:66)
        at com.github.monkeywie.proxyee.server.HttpProxyServer.start(HttpProxyServer.java:125)
        at com.github.monkeywie.proxyee.server.HttpProxyServer.start(HttpProxyServer.java:121)
        at com.cambridge.proxeeapp.MainActivity.proxee(MainActivity.java:102)
        at com.cambridge.proxeeapp.MainActivity$1.onClick(MainActivity.java:43)
        at android.view.View.performClick(View.java:7869)
        at android.view.View.performClickInternal(View.java:7838)
        at android.view.View.access$3600(View.java:886)
        at android.view.View$PerformClick.run(View.java:29362)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:8107)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

I downloaded the certificate crt and .der files from this repository and placed them into a src/resources. I'm on a Mac.

Any idea?

monkeyWie commented 3 years ago

It seems that the sdk version is too low, see https://stackoverflow.com/a/59448917/8129004.

Rich2020 commented 3 years ago

Thank you! That solved that error, but there is now another (don't know if it is related) - I'll create a new issue.