【Android webRTC 代码下载编译】满堂花醉三千客,一剑霜寒十四州。这篇文章主要讲述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 cdwebrtc
下载代码
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 -C out/Debug
编译完成后,就可以在out/Debug/apks目录下找到AppRTCMobile.apk了
推荐阅读
- Android 判断当前语言环境是否是中文环境
- android设计的布局在阿拉伯语下界面错乱的解决方法
- App更新之dialog数字进度条
- 深入理解Angular中的$apply()以及$digest()
- Visual StudioThe project appears to be under source control, but the associated source control plu(代
- AndroidStudio运行程序提示Error running app : No target device found
- 安卓开源项目周报0411
- android MVP例子
- Android入门:MVC模式(中)