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

Could not invoke method solution(安卓14息屏报错解决方案) #937

Open
LeeSaltyFish opened this issue Mar 28, 2024 · 4 comments
Open

Comments

@LeeSaltyFish
Copy link

当我使用息屏功能的时候/自动息屏功能的时候,会报错如下

AdbProcessImpl::error:[server] ERROR: Could not invoke method
java.lang.NoSuchMethodException: android.view.SurfaceControl.getPhysicalDisplayIds []
at java.lang.Class.getMethod(Class.java:2937)
at java.lang.Class.getMethod(Class.java:2449)
at com.genymobile.scrcpy.wrappers.SurfaceControl.getGetPhysicalDisplayIdsMethod(SurfaceControl.java:137)
at com.genymobile.scrcpy.wrappers.SurfaceControl.getPhysicalDisplayIds(SurfaceControl.java:144)
at com.genymobile.scrcpy.Device.setScreenPowerMode(Device.java:319)
at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:169)
at com.genymobile.scrcpy.Controller.control(Controller.java:83)
at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:91)
at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda1.run(Unknown Source:4)
at java.lang.Thread.run(Thread.java:1012)
[server] ERROR: Could not get physical display ids

@LeeSaltyFish
Copy link
Author

LeeSaltyFish commented Mar 28, 2024

the solution

download the scrcpy-server-v2.4

rename the "scrcpy-server-v2.4" to "scrcpy-server"

copy and cover the scrcpy-server in the folder

change the "config.ini" in "config" folder

the change detail is “ServerVersion=2.1.1” to "ServerVersion=2.4"

@LeeSaltyFish LeeSaltyFish changed the title Could not invoke method Could not invoke method solution(安卓14息屏报错解决方案) Mar 28, 2024
@zslhub
Copy link

zslhub commented Mar 28, 2024

@LeeSaltyFish 我使用了你的解决方法,但是没有作用,你看一下有什么解决办法吗?会报错如下
AdbProcessImpl::error:Native registration unable to find class 'com/android/server/DeviceControlService'; aborting...

@barry-ran
Copy link
Owner

try v2.2.1

@zslhub
Copy link

zslhub commented Apr 8, 2024

试用 v2.2.1

刚刚尝试了最新版本2.2.1,问题还是存在的,我是使用Android14链接的Windows11(23H2-22631.2506),投屏成功后点击熄屏投屏就断开了,报错如下:
AdbProcessImpl::error:Native registration unable to find class 'com/android/server/DeviceControlService'; aborting...
AdbProcessImpl::error:Aborted

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

3 participants