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

adb: error: cannot stat 'scrcpy-server.jar': No such file or directory #448

Closed
bluekuen opened this issue Mar 8, 2019 · 7 comments
Closed

Comments

@bluekuen
Copy link

bluekuen commented Mar 8, 2019

I'm using Windows 7. Downloaded the Windows 64 bit Version.
Added the Folder to C:\Programs\scrcpy.
Added the Path of the Folder to my Path Environment Variable.
Now when i try to execute it, it doesn't find the jar. Can you please help me?

That's the cmd output:

C:\Users\bluekuen>scrcpy --serial ad0617232e52f2d9a9
adb: error: cannot stat 'scrcpy-server.jar': No such file or directory
ERROR: "adb push" returned with value 1
Press any key to continue...

@rom1v
Copy link
Collaborator

rom1v commented Mar 8, 2019

#278 (comment)

The problem is that scrcpy pushes the scrcpy-server.jar that it finds in . (your current directory). If you start scrcpy from PATH, it expects scrcpy-server.jar to be in ., i.e. the current directory, the one from where you call (the Windows version is "portable", it overrides the server path).

If you want your scrcpy-server.jar to be in a directory other than ., you need to give its full path in the env variable SCRCPY_SERVER_PATH.

@bluekuen
Copy link
Author

bluekuen commented Mar 8, 2019

Thanks for the fast answer. Unfortunately i don't get it.
I don't have and don't want the scrcpy-server.jar in another directory. It's in the same directory as the other files. Or do i need to copy it in another directory and provide the SCRCPY_SERVER_PATH env variable?

@rom1v
Copy link
Collaborator

rom1v commented Mar 8, 2019

I don't have and don't want the scrcpy-server.jar in another directory.

In a directory other than ., i.e. the directory you are currently in (C:\Users\bluekuen in your example).

@bluekuen
Copy link
Author

bluekuen commented Mar 8, 2019

Thank you so much @rom1v i accidentally named it SCRCPY_SERVER_JAR.
Now it's working! 👍

@rom1v rom1v closed this as completed Mar 13, 2019
@aashutoshrathi
Copy link

aashutoshrathi commented May 7, 2019

SCRCPY_SERVER_PATH was needed in my case too.
Thanks! @bluekuen

@bluekuen
Copy link
Author

bluekuen commented May 8, 2019

Nice to hear, sometimes it's the small things ! :)

@yaaangzh
Copy link

thanks!!I have the same problem

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

4 participants