Menu Home

Build WebRTC

First of All, You have evaded the “WALL”. God bless you.

Host OS: Ubuntu 16.04 LTE

Build Tools

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Then add depot_tools to your PATH

Checkout Source

Set the target OS

Here, I will build webrtc for Andorid platform.

export GYP_DEFINES="OS=android"

Sync Source

mkdir webrtc_android
cd webrtc_android
fetch --nohooks webrtc_android
gclient sync

Many cups of coffee (23GB !!)… … … … … … … … … … …

During the download process, You should agree Google Play License (Press y):

222

Compiling

Install dependence

sh src/build/install-build-deps-android.sh

Gerate projects using GN

cd webrtc_android/src
gn gen out/arm --args='target_os="android" target_cpu="arm"'

You can specify different output directory for your build target:

  • target_cpu=”arm64″
  • target_cpu=”x86″
  • target_cpu=”x64″

If you get the error below:
555

Run the command:

python build/android/play_services/update.py  download

Thrilling moment for you !!

Compile

ninja -C out/arm

Android Example App

Android Example App is located at src/webrtc/examples/androidapp

Categories: android应用 android构建工具 iOS

Tagged as:

lnmcc

Leave a Reply

Your email address will not be published.