Android WebRTC Code Download compilation

Source: Internet
Author: User

1. Installing depot Tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Then add the depot_tools to the environment variable.

Export Path=path_to_depot_tools: $PATH
2. Download the Code

Create a working directory

mkdir WEBRTCCD  WebRTC

Download code

Export gyp_defines="os=android"--sync

This would fetch a regular WebRTC checkout with the android-specific parts added. Notice that the Android specific parts like the Android SDK and NDK is quite large (to GB), so the total checkout size WI ll be is about + GB. The same checkout can be used to both Linux and Android development since you can generate your Ninja project files in di Fferent directories for each build config.

3. Compiling the Code

Creating a project with GN

Under the SRC directory, execute the following command

GN Gen Out/debug--args='target_os= "android" target_cpu= "arm"

You can specify a directory of your own choice instead out/Debug of, to enable managing multiple configurations in parallel.

    • To build for Arm64:usetarget_cpu="arm64"
    • To build for 32-bit X86:usetarget_cpu="x86"
    • To build for 64-bit X64:usetarget_cpu="x64"

Then compile the code with Ninja

Ninja-c Out/debug

Once the compilation is complete, you can find apprtcmobile.apk in the Out/debug/apks directory.

Android WebRTC Code Download compilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.