Genymobile / scrcpy

Display and control your Android device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NoSuchMethodException: android.view.SurfaceControl.createDisplay (Google Pixel 6 Pro Android 15 Beta 1)

liu6x6 opened this issue · comments

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: [macOS 13.5.2]
  • scrcpy version: [2.3.1]
  • installation method: [brew]
  • device model: Google Pixel
  • Android version: [15 Beta 1 (shows Android 14 on scrcpy output)]

Describe the bug
Look like the Android 15 has removed android.view.SurfaceControl.createDisplay API

On errors, please provide the output of the console (and adb logcat if relevant).

scrcpy 2.3.1 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  1C101FDEE006ZZ                  device  Pixel_6_Pro
/usr/local/Cellar/scrcpy/2.3.1/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 124.9 MB/s (66007 bytes in 0.001s)
[server] INFO: Device: [Google] google Pixel 6 Pro (Android 14)
[server] ERROR: Exception on thread Thread[video,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:85)
	at com.genymobile.scrcpy.ScreenCapture.createDisplay(ScreenCapture.java:77)
	at com.genymobile.scrcpy.ScreenCapture.start(ScreenCapture.java:38)
	at com.genymobile.scrcpy.SurfaceEncoder.streamScreen(SurfaceEncoder.java:72)
	at com.genymobile.scrcpy.SurfaceEncoder.lambda$start$0$com-genymobile-scrcpy-SurfaceEncoder(SurfaceEncoder.java:253)
	at com.genymobile.scrcpy.SurfaceEncoder$$ExternalSyntheticLambda0.run(Unknown Source:4)
	at java.lang.Thread.run(Thread.java:1012)
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:83)
	... 6 more
INFO: Renderer: metal
ERROR: Demuxer 'audio': stream disabled due to connection error
ERROR: Demuxer error

Please do not post screenshots of your terminal, just post the content as text instead.

Upgrade to the latest version (currently 2.4).

thanks so much, yes 2.4 is working good.