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

android.view.SurfaceControl.createDisplay #5730

Closed
bingxuebojue opened this issue Jan 3, 2025 · 3 comments
Closed

android.view.SurfaceControl.createDisplay #5730

bingxuebojue opened this issue Jan 3, 2025 · 3 comments

Comments

@bingxuebojue
Copy link

C:\Users\lenovo>scrcpy -Vdebug
scrcpy 1.25 https://github.com/Genymobile/scrcpy
DEBUG: ADB device found:
DEBUG: --> (usb) AVRK023C30047187 device BVL_AN16
DEBUG: Device serial: AVRK023C30047187
DEBUG: Using server (portable): D:\program-installation\scrcpy-win64\scrcpy-win64-v1.25\scrcpy-server
D:\program-installation\scrcpy-win64\scrcpy-win64-v1.25\scrcpy-server: 1 file pushed, 0 skipped. 46.8 MB/s (42151 bytes in 0.001s)
[server] INFO: Device: HONOR BVL-AN16 (Android 15)
[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:2950)
at java.lang.Class.getMethod(Class.java:2450)
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.(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:424)
[server] ERROR: Exception on thread Thread[Thread-2,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:75)
at com.genymobile.scrcpy.Device.injectEvent(Device.java:192)
at com.genymobile.scrcpy.Device.injectKeyEvent(Device.java:203)
at com.genymobile.scrcpy.Device.pressReleaseKeycode(Device.java:211)
at com.genymobile.scrcpy.Device.pressReleaseKeycode(Device.java:216)
at com.genymobile.scrcpy.Controller.control(Controller.java:66)
at com.genymobile.scrcpy.Server$3.run(Server.java:132)
at java.lang.Thread.run(Thread.java:1019)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:72)
... 7 more
Caused by: java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:207)
at android.hardware.input.InputManager.getInstance(InputManager.java:278)
... 9 more
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
[server] DEBUG: Using encoder: 'c2.qti.avc.encoder'
DEBUG: Receiver stopped
[server] DEBUG: Device message sender stopped
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:83)
at com.genymobile.scrcpy.ScreenEncoder.createDisplay(ScreenEncoder.java:278)
at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:84)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:74)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:100)
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:424)
Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
at java.lang.Class.getMethod(Class.java:2950)
at java.lang.Class.getMethod(Class.java:2450)
at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:81)
... 7 more
DEBUG: Server disconnected
DEBUG: Server terminated
INFO: Renderer: direct3d
DEBUG: Trilinear filtering disabled (not an OpenGL renderer)
DEBUG: Using icon (portable): D:\program-installation\scrcpy-win64\scrcpy-win64-v1.25\icon.png
INFO: Initial texture: 1280x2800
DEBUG: Starting demuxer thread
DEBUG: End of frames
WARN: Device disconnected
DEBUG: quit...

@rom1v
Copy link
Collaborator

rom1v commented Jan 3, 2025

scrcpy 1.25

This is completely outdated. Use the latest version (currently 3.1).

@rom1v rom1v closed this as completed Jan 3, 2025
@bingxuebojue
Copy link
Author

crcpy 1.25

C:\Users\lenovo>scrcpy
scrcpy 3.1 https://github.com/Genymobile/scrcpy
INFO: ADB device found:
INFO: --> (usb) AVRK023C30047187 device BVL_AN16
D:\program-installation\scrcpy-win64\scrcpy-win64-v3.1\scrcpy-server: 1 file pushed, 0 skipped. 64.3 MB/s (90640 bytes in 0.001s)
[server] INFO: Device: [HONOR] HONOR BVL-AN16 (Android 15)
INFO: Renderer: direct3d
INFO: Texture: 1280x2800

C:\Users\lenovo>adb usb
restarting in USB mode

C:\Users\lenovo>adb logcat -s scrcpy
--------- beginning of main
01-04 02:01:39.801 23384 23384 I scrcpy : Device: HONOR BVL-AN16 (Android 15)
01-04 02:01:39.816 23384 23384 E scrcpy : Could not invoke method
01-04 02:01:39.816 23384 23384 E scrcpy : java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, int]
01-04 02:01:39.816 23384 23384 E scrcpy : at java.lang.Class.getMethod(Class.java:2950)
01-04 02:01:39.816 23384 23384 E scrcpy : at java.lang.Class.getMethod(Class.java:2450)
01-04 02:01:39.816 23384 23384 E scrcpy : at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:103)
01-04 02:01:39.816 23384 23384 E scrcpy : at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:111)
01-04 02:01:39.816 23384 23384 E scrcpy : at com.genymobile.scrcpy.Device.(Device.java:89)
01-04 02:01:39.816 23384 23384 E scrcpy : at com.genymobile.scrcpy.Server.scrcpy(Server.java:24)
01-04 02:01:39.816 23384 23384 E scrcpy : at com.genymobile.scrcpy.Server.main(Server.java:255)
01-04 02:01:39.816 23384 23384 E scrcpy : at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
01-04 02:01:39.816 23384 23384 E scrcpy : at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:424)
01-04 02:01:39.988 23384 23384 E scrcpy : Exception on thread Thread[main,5,main]
01-04 02:01:39.988 23384 23384 E scrcpy : java.lang.AssertionError: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
01-04 02:01:39.988 23384 23384 E scrcpy : at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:83)
01-04 02:01:39.988 23384 23384 E scrcpy : at com.genymobile.scrcpy.ScreenEncoder.createDisplay(ScreenEncoder.java:229)
01-04 02:01:39.988 23384 23384 E scrcpy : at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:75)
01-04 02:01:39.988 23384 23384 E scrcpy : at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:65)
01-04 02:01:39.988 23384 23384 E scrcpy : at com.genymobile.scrcpy.Server.scrcpy(Server.java:80)
01-04 02:01:39.988 23384 23384 E scrcpy : at com.genymobile.scrcpy.Server.main(Server.java:255)
01-04 02:01:39.988 23384 23384 E scrcpy : at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
01-04 02:01:39.988 23384 23384 E scrcpy : at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:424)
01-04 02:01:39.988 23384 23384 E scrcpy : Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
01-04 02:01:39.988 23384 23384 E scrcpy : at java.lang.Class.getMethod(Class.java:2950)
01-04 02:01:39.988 23384 23384 E scrcpy : at java.lang.Class.getMethod(Class.java:2450)
01-04 02:01:39.988 23384 23384 E scrcpy : at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:81)
01-04 02:01:39.988 23384 23384 E scrcpy : ... 7 more
^C
换成3.1后这个是什么原因??

@rom1v
Copy link
Collaborator

rom1v commented Jan 3, 2025

These are probbly old logcat entries. The error does not happen in your scrcpy terminal.

Clean your logcat:

adb logcat -c

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

2 participants