scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Build under linux server

Open coolcup74 opened this issue 3 years ago • 7 comments

Hello. Thank you for sharing excellent tool!

I'd like to build scrcpy client and sever but, I am not able to build them even though seeing the build doc.

Can you explain step by step for building under linux server?

Thank you in advance

coolcup74 avatar Jun 24 '22 04:06 coolcup74

I am not able to build them even though seeing the build doc.

What did you try and what problem did you encounter?

rom1v avatar Jun 24 '22 04:06 rom1v

When I input build command, it shows error like the below.

root@ubuntu:~/scrcpy# meson x --buildtype=release --strip -Db_lto=true Error during basic setup:

[Errno 2] No such file or directory: '/root/scrcpy/x' root@ubuntu:~/scrcpy#

coolcup74 avatar Jun 24 '22 05:06 coolcup74

And I have no idea how to install Android SDK on linux server.

coolcup74 avatar Jun 24 '22 05:06 coolcup74

What is your meson version?

rom1v avatar Jun 24 '22 12:06 rom1v

root@ubuntu:~# meson -v 0.29.0 root@ubuntu:~#

coolcup74 avatar Jun 24 '22 15:06 coolcup74

That's (way) too old.

You could mkdir x to solve your specific problem, but you'll get others.

scrcpy currently requires meson >= 0.48.

rom1v avatar Jun 24 '22 15:06 rom1v

I tried again and got the below error messages.

===========================================================

coolcup@EricPark:~/scrcpy$ ninja -Cx ninja: Entering directory `x' [0/1] Generating scrcpy-server with a custom command. Observed package id 'build-tools;debian' in inconsistent location '/usr/lib/android-sdk/build-tools/27.0.1' (Expected '/usr/lib/android-sdk/build-tools/debian') Observed package id 'build-tools;debian' in inconsistent location '/usr/lib/android-sdk/build-tools/27.0.1' (Expected '/usr/lib/android-sdk/build-tools/debian') Checking the license for package Android SDK Build-Tools 30.0.2 in /usr/lib/android-sdk/licenses Warning: License for package Android SDK Build-Tools 30.0.2 not accepted. Checking the license for package Android SDK Platform 31 in /usr/lib/android-sdk/licenses Warning: License for package Android SDK Platform 31 not accepted.

FAILURE: Build failed with an exception.

  • What went wrong: Could not determine the dependencies of task ':server:compileReleaseJavaWithJavac'.

Failed to install the following Android SDK packages as some licences have not been accepted. build-tools;30.0.2 Android SDK Build-Tools 30.0.2 platforms;android-31 Android SDK Platform 31 To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

Using Android SDK: /usr/lib/android-sdk

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings

coolcup74 avatar Jun 27 '22 13:06 coolcup74