Please read the prerequisites to run scrcpy.
Also read the FAQ and check if your issue already exists.
Environment
- OS: Linux Mint Cinnamon 6.6.7
- Scrcpy version: 1.25
- Installation method: apt install scrcpy
- Device model: Vivo Y27
- Android version: Funtouch OS 15
Describe the bug
I got an error when I first turned it on after installing.
On errors, please provide the output of the console (and adb logcat if relevant).
[server] ERROR: Could not invoke method
java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]
at java.lang.Class.getMethod(Class.java:2940)
at java.lang.Class.getMethod(Class.java:2440)
at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:128)
at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:138)
at com.genymobile.scrcpy.Device.<init>(Device.java:100)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:64)
at com.genymobile.scrcpy.Server.main(Server.java:334)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:414)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 25.2.8-0ubuntu0.24.04.1
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2384
WARN: Device disconnected
I also include the results from adb logcat, maybe that can be more helpful
4-13 09:26:24.793 9679 9679 E scrcpy : Could not invoke method
04-13 09:26:24.793 9679 9679 E scrcpy : java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]
04-13 09:26:24.793 9679 9679 E scrcpy : at java.lang.Class.getMethod(Class.java:2940)
04-13 09:26:24.793 9679 9679 E scrcpy : at java.lang.Class.getMethod(Class.java:2440)
04-13 09:26:24.793 9679 9679 E scrcpy : at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:128)
04-13 09:26:24.793 9679 9679 E scrcpy : at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:138)
04-13 09:26:24.793 9679 9679 E scrcpy : at com.genymobile.scrcpy.Device.<init>(Device.java:100)
04-13 09:26:24.793 9679 9679 E scrcpy : at com.genymobile.scrcpy.Server.scrcpy(Server.java:64)
04-13 09:26:24.793 9679 9679 E scrcpy : at com.genymobile.scrcpy.Server.main(Server.java:334)
04-13 09:26:24.793 9679 9679 E scrcpy : at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
04-13 09:26:24.793 9679 9679 E scrcpy : at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:414)
04-13 09:26:24.881 9679 9679 E AndroidRuntime: at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:83)
04-13 09:26:24.881 9679 9679 E AndroidRuntime: at com.genymobile.scrcpy.ScreenEncoder.createDisplay(ScreenEncoder.java:278)
04-13 09:26:24.881 9679 9679 E AndroidRuntime: at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:84)
04-13 09:26:24.881 9679 9679 E AndroidRuntime: at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:74)
04-13 09:26:24.881 9679 9679 E AndroidRuntime: at com.genymobile.scrcpy.Server.scrcpy(Server.java:100)
04-13 09:26:24.881 9679 9679 E AndroidRuntime: at com.genymobile.scrcpy.Server.main(Server.java:334)
04-13 09:26:24.881 9679 9679 E AndroidRuntime: at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:81)
04-13 09:26:24.882 9679 9679 E scrcpy : Exception on thread Thread[main,5,main]
04-13 09:26:24.882 9679 9679 E scrcpy : java.lang.AssertionError: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
04-13 09:26:24.882 9679 9679 E scrcpy : at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:83)
04-13 09:26:24.882 9679 9679 E scrcpy : at com.genymobile.scrcpy.ScreenEncoder.createDisplay(ScreenEncoder.java:278)
04-13 09:26:24.882 9679 9679 E scrcpy : at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:84)
04-13 09:26:24.882 9679 9679 E scrcpy : at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:74)
04-13 09:26:24.882 9679 9679 E scrcpy : at com.genymobile.scrcpy.Server.scrcpy(Server.java:100)
04-13 09:26:24.882 9679 9679 E scrcpy : at com.genymobile.scrcpy.Server.main(Server.java:334)
04-13 09:26:24.882 9679 9679 E scrcpy : at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
04-13 09:26:24.882 9679 9679 E scrcpy : at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:414)
04-13 09:26:24.882 9679 9679 E scrcpy : Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
04-13 09:26:24.882 9679 9679 E scrcpy : at java.lang.Class.getMethod(Class.java:2940)
04-13 09:26:24.882 9679 9679 E scrcpy : at java.lang.Class.getMethod(Class.java:2440)
04-13 09:26:24.882 9679 9679 E scrcpy : at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:81)
04-13 09:26:24.882 9679 9679 E scrcpy : ... 7 more
04-13 09:26:25.290 9691 9691 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.CleanUp
04-13 09:26:25.932 9691 9691 I scrcpy : Cleaning up
04-13 09:26:25.943 9691 9691 I scrcpy : Restoring normal power mode
04-13 09:26:25.944 9691 9691 E scrcpy : Could not invoke method
04-13 09:26:25.944 9691 9691 E scrcpy : java.lang.NoSuchMethodException: android.view.SurfaceControl.getInternalDisplayToken []
04-13 09:26:25.944 9691 9691 E scrcpy : at java.lang.Class.getMethod(Class.java:2940)
04-13 09:26:25.944 9691 9691 E scrcpy : at java.lang.Class.getMethod(Class.java:2440)
04-13 09:26:25.944 9691 9691 E scrcpy : at com.genymobile.scrcpy.wrappers.SurfaceControl.getGetBuiltInDisplayMethod(SurfaceControl.java:94)
04-13 09:26:25.944 9691 9691 E scrcpy : at com.genymobile.scrcpy.wrappers.SurfaceControl.getBuiltInDisplay(SurfaceControl.java:103)
04-13 09:26:25.944 9691 9691 E scrcpy : at com.genymobile.scrcpy.Device.setScreenPowerMode(Device.java:280)
04-13 09:26:25.944 9691 9691 E scrcpy : at com.genymobile.scrcpy.CleanUp.main(CleanUp.java:189)
04-13 09:26:25.944 9691 9691 E scrcpy : at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
04-13 09:26:25.944 9691 9691 E scrcpy : at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:414)
04-13 09:26:25.946 9691 9691 E scrcpy : Could not get built-in display
Please do not post screenshots of your terminal, just post the content as text instead.
Please read the prerequisites to run scrcpy.
Also read the FAQ and check if your issue already exists.
Environment
Describe the bug
I got an error when I first turned it on after installing.
On errors, please provide the output of the console (and
adb logcatif relevant).I also include the results from adb logcat, maybe that can be more helpful
Please do not post screenshots of your terminal, just post the content as text instead.