之前一直按如下方法同步webrtc代码,可一直不成功。
1.同步WebRTC代码
1.创建WebRTC目录
mkdir WebRTC
cd WebRTC
2.初始化gclient
gclient config http://webrtc.googlecode.com/svn/trunk
3. 设计目标系统版本的配置
echo "target_os = ['android', 'unix']" >> .gclient
4. sync代码
gclient sync --nohook
今天按照如下网站指导下载代码:
http://www.webrtc.org/native-code/android
步骤:
Getting the code
Android development is only supported on Linux.See Development for instructions on how to update the code, building etc.
- Install Prerequisite software
- Set the path to your Java OpenJDK 7 dir if you're not using the Ubuntu default:
export JAVA_HOME=<location of OpenJDK 7>- Set the target OS in your environment:
export GYP_DEFINES="OS=android"- Create a working directory, enter it, and run:
This will fetch a regular WebRTC checkout with the Android-specific parts added. The same checkout can be used for both Linux and Android development, depending on the OS you set infetch webrtc_androidGYP_DEFINES(see above).
Using the bundled Android SDK/NDK
In order to use the Android SDK and NDK that is bundled inThen you'll havethird_party/android_tools, run this to get it included in your PATH (fromsrc/):
. build/android/envsetup.shadband all the other Android tools in your PATH.
Running the AppRTCDemo app
AppRTCDemo is an Android application using WebRTC Native APIs via JNI ( JNI wrapper is documented here ).For instructions on how to build and run, see talk/examples/android/README.
本文提供了一步一步的指导,帮助用户解决在同步WebRTC代码时遇到的问题,并通过特定的环境设置和命令操作实现成功同步。
2348

被折叠的 条评论
为什么被折叠?



