Scrcpy: Error while building ninja on macOS, High Sierra, 10.13.3

Created on 12 Mar 2018  路  9Comments  路  Source: Genymobile/scrcpy

I got this error. FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/jacobsoderman/github/scrcpy/server/build.gradle' line: 1

  • What went wrong:

A problem occurred evaluating project ':server'.
  java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

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

BUILD FAILED in 39s
ninja: build stopped: subcommand failed.

/S枚der

build

Most helpful comment

I now understand I had to rename the server file. Stupid by me.

But now I got this problem, I think has to do with adb. How do I set the path for that? "At runtime, adb must be accessible from your PATH."

scrcpy
exec: No such file or directory
2018-03-12 21:53:37.604 scrcpy[10250:799179] ERROR: "adb push" returned with value 1

EDIT: I solved it. https://stackoverflow.com/questions/17901692/set-up-adb-on-mac-os-x

All 9 comments

Unsupported major.minor version 52.0

You need Java 8.

OK. Thanks. But I read further down and downloaded the .jar instead.

But I then got this error.

$ ninja
ninja: error: '/Users/mainuser/github/scrcpy-server.jar', needed by 'server/scrcpy-server.jar', missing and no known rule to make it

/S枚der

What was the initial meson command you executed?

In the readme file, under Prebuilt server, after I've specified the path the downloaded scrcpy-server-v1.0.jar,

meson x --buildtype release --strip -Db_lto=true \
    -Dprebuilt_server=/path/to/scrcpy-server.jar
cd x
ninja
sudo ninja install

It was then I typed "ninja" I got that...

/S枚der

I'm having the same issue:
/scrcpy$ meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=~/Documents/scrcpy-server-v1.0.jar

WARNING: You are using 'ANSI_X3.4-1968' which is not a a Unicode-compatible locale.
WARNING: You might see errors if you use UTF-8 strings as filenames, as strings, or as file contents.
WARNING: Please switch to a UTF-8 locale for your platform.
The Meson build system
Version: 0.37.1
Source dir: /home//Documents/scrcpy
Build dir: /home//Documents/scrcpy/x
Build type: native build
Project name: scrcpy
Native c compiler: cc (gcc 6.3.0)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29)
Native dependency libavformat found: YES 57.56.101

cd x
ninja

ninja: error: '../server/~/Documents/scrcpy-server-v1.0.jar', needed by 'server/scrcpy-server.jar', missing and no known rule to make it

Native dependency libavcodec found: YES 57.64.101
Native dependency libavutil found: YES 55.34.101
Native dependency sdl2 found: YES 2.0.5
Build targets in project: 6

@abacao Try using the full absolute path for the server:

meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server="$HOME"/Documents/scrcpy-server-v1.0.jar

I now understand I had to rename the server file. Stupid by me.

But now I got this problem, I think has to do with adb. How do I set the path for that? "At runtime, adb must be accessible from your PATH."

scrcpy
exec: No such file or directory
2018-03-12 21:53:37.604 scrcpy[10250:799179] ERROR: "adb push" returned with value 1

EDIT: I solved it. https://stackoverflow.com/questions/17901692/set-up-adb-on-mac-os-x

So, it's fixed?

Option 1 solved the problem
https://stackoverflow.com/a/28208121/7540894

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tonypachino picture tonypachino  路  3Comments

jonnybrooks picture jonnybrooks  路  3Comments

YurieCo picture YurieCo  路  4Comments

sennight picture sennight  路  3Comments

cutoseo picture cutoseo  路  4Comments