Android webRTC 代碼下載編譯

來源:互聯網
上載者:User

標籤:sdk   tps   multiple   oid   not   choice   ice   can   ble   

1、安裝depot tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

然後把把depot_tools添加到環境變數中去

export PATH=path_to_depot_tools:$PATH
2.下載代碼

建立一個工作目錄

mkdir webrtccd  webrtc

下載代碼

export GYP_DEFINES="OS=android"fetch --nohooks webrtc_androidgclient sync

This will fetch a regular WebRTC checkout with the Android-specific parts added. Notice that the Android specific parts like the Android SDK and NDK are quite large (~8 GB), so the total checkout size will be about 16 GB. The same checkout can be used for both Linux and Android development since you can generate your Ninja project files in different directories for each build config.

3.編譯代碼

使用gn建立工程

在src目錄下,執行下面命令

gn gen out/Debug --args=‘target_os="android" target_cpu="arm"‘

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

  • To build for ARM64: use target_cpu="arm64"
  • To build for 32-bit x86: use target_cpu="x86"
  • To build for 64-bit x64: use target_cpu="x64"

然後使用ninja編譯代碼

ninja -C out/Debug

編譯完成後,就可以在out/Debug/apks目錄下找到AppRTCMobile.apk了

Android webRTC 代碼下載編譯

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.