pristineio / webrtc-build-scripts

A set of build scripts useful for building WebRTC libraries for Android and iOS.
BSD 3-Clause "New" or "Revised" License
1.13k stars 447 forks source link

how to build webrtc by android studio #226

Open microIBM opened 7 years ago

microIBM commented 7 years ago

i had download all the source code by the webrtc-build-script. and i can buid_webrtc successfully. but i want to import the project into android studio. what should i do? i follow the guide from this link "https://webrtc.org/native-code/android/", execute command "build/android/gradle/generate_gradle.py --output-directory $PWD/out/Debug \ --target "//webrtc/examples:AppRTCMobile" --use-gradle-process-resources \ --split-projects". but it has errors like this:

build/android/gradle/generate_gradle.py --output-directory $PWD/out_android_arm/Release --target "//webrtc/examples:AppRTCMobile" --use-gradle-process-resources --split-projects W 0.000s Main Creating project at: /home/haoxihuan/workspace/webrtc-build-scripts/android/webrtc/src/out_android_arm/Release/gradle W 0.001s Main Building .build_config files... ['ninja', '-C', '/home/haoxihuan/workspace/webrtc-build-scripts/android/webrtc/src/out_android_arm/Release', '-j1000', 'webrtc/examples:AppRTCMobilebuild_config'] Traceback (most recent call last): File "build/android/gradle/generate_gradle.py", line 828, in main() File "build/android/gradle/generate_gradle.py", line 756, in main _RunNinja(output_dir, [e.NinjaBuildConfigTarget() for e in main_entries]) File "build/android/gradle/generate_gradle.py", line 108, in _RunNinja subprocess.check_call(cmd) File "/usr/lib/python2.7/subprocess.py", line 536, in check_call retcode = call(*popenargs, *kwargs) File "/usr/lib/python2.7/subprocess.py", line 523, in call return Popen(popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 711, in init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

microIBM commented 7 years ago

sorry, my mistake. after i export depot_tools into PATH, i can build the gradle project