scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

ninja -Cx failed

Open yufeiluo opened this issue 3 years ago • 3 comments

debian@debian:~/scrcpy$ ninja -Cx 
ninja: Entering directory `x'
[23/30] Generating scrcpy-server with a custom command.
Downloading https://services.gradle.org/distributions/gradle-6.3-bin.zip
.........10%..........20%..........30%.........40%..........50%..........60%.........70%..........80%..........90%..........100%

Welcome to Gradle 6.3!

Here are the highlights of this release:
 - Java 14 support
 - Improved error messages for unexpected failures

For more details see https://docs.gradle.org/6.3/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':server'.
> Could not create task ':server:assembleRelease'.
   > Could not create task ':server:lintVitalRelease'.
      > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/home/debian/scrcpy/local.properties'.

* 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

BUILD FAILED in 39s
[29/30] Linking target app/scrcpy.
FAILED: server/scrcpy-server 
/home/debian/scrcpy/server/./scripts/build-wrapper.sh /home/debian/scrcpy/server server/scrcpy-server release
ninja: build stopped: subcommand failed.

yufeiluo avatar Jun 28 '21 00:06 yufeiluo

Did you forget to set the ANDROID_SDK_ROOT variable?

ajgringo619 avatar Jun 28 '21 02:06 ajgringo619

If you want to build the server, you need the Android SDK.

If you don't want to build the server, use the prebuilt server.

https://github.com/Genymobile/scrcpy/blob/master/BUILD.md

rom1v avatar Jun 28 '21 06:06 rom1v

I'm using fish, export ANDROID_SDK_ROOT doesn't work. I had to use set -x ANDROID_SDK_ROOT

Camouflager avatar Apr 13 '23 10:04 Camouflager