从 Android 的源构建 WebRTC 时出错

Error building WebRTC from source for Android

我 运行 遇到了从 Chromium 获取 webrtc 在本地设置和构建的问题。当 运行 gclient sync 时,出现以下错误:

________ running 'python3 src/build/linux/sysroot_scripts/install-sysroot.py --arch=i386' in '/Users/nbishop/code/ex/webrtc_custom/build_webrtc/webrtc/android'
Installing Debian sid i386 root image: /Users/nbishop/code/ex/webrtc_custom/build_webrtc/webrtc/android/src/build/linux/debian_sid_i386-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/23d12100f83139fc55349a841214d5d0bbd85a8d/debian_sid_i386_sysroot.tar.xz
Failed to download https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/23d12100f83139fc55349a841214d5d0bbd85a8d/debian_sid_i386_sysroot.tar.xz
Error: Command 'python3 src/build/linux/sysroot_scripts/install-sysroot.py --arch=i386' returned non-zero exit status 1 in /Users/nbishop/code/ex/webrtc_custom/build_webrtc/webrtc/android
Installing Debian sid i386 root image: /Users/nbishop/code/ex/webrtc_custom/build_webrtc/webrtc/android/src/build/linux/debian_sid_i386-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/23d12100f83139fc55349a841214d5d0bbd85a8d/debian_sid_i386_sysroot.tar.xz
Failed to download https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/23d12100f83139fc55349a841214d5d0bbd85a8d/debian_sid_i386_sysroot.tar.xz

这是在 Mac 上进行的。我可以很好地下载 tar.xz,但由于某种原因,脚本在这部分失败了。 python --version returns 2.7.16,尽管我也尝试过使用 python 别名为 python3。

看来 android 的 webrtc 只能在 Linux 上构建,这就是为什么 gclient 同步/安装构建工具在 MacOS 上不起作用的原因。