Android webRTC 代碼下載編譯


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 webrtc
cd  webrtc

下載代碼

export GYP_DEFINES="OS=android"
fetch --nohooks webrtc_android
gclient 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了

 

2017年12月4日更新

Windows版本下載、編譯

http://blog.csdn.net/wirelessdisplay/article/details/63263991


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM