This article records in detail the process of installing ubuntu18.4 desktop version using PD virtual machine under Mac and compiling Android Native WebRTC.
Note that if you only use WebRTC, you don't need to manually compile the source code, just use the official precompiled package:
The easiest way to get started is using the official prebuilt libraries available at JCenter. These libraries are compiled from the tip-of-tree and are meant for development purposes only.
On Android Studio 3 add to your dependencies:
implementation 'org.webrtc:google-webrtc:1.0.+'
On Android Studio 2 add to your dependencies:
compile 'org.webrtc:google-webrtc:1.0.+'
The version of the library is 1.0… The hash of the commit can be found in the .pom-file. The third party licenses can be found in the THIRD_PARTY_LICENSES.md file next to the .aar-file.
Only when you need to study and modify the source code is it necessary to download the code and compile it yourself.
Compiling the WebRTC source code according to the tutorial on the official website seems simple, but there are many pitfalls, especially in order to be able to connect to Google to configure the proxy for a long time, and the virtual machine itself is not worry-free.
For this reason, a newly created virtual machine was configured from the beginning, because the things tossed before may not be remembered, and there was no record at that time. It is guaranteed that a command is recorded from the beginning. Of course, changes in the software and system of each link used here will lead to inconsistent configuration processes, which are for reference only.
Install and configure Ubuntu virtual machine
Ubuntu download address:
http://releases.ubuntu.com/18.04/ubuntu-18.04-desktop-amd64.iso
Detailed installation steps:
1. Select the mirroring method for installation, do not choose the following to download Ubuntu, it is very slow
2. After entering this page, click "manual selection"
3. Select the downloaded iso file
4. Ubuntu is recognized after selection, continue
5. Set username and password
6. Set the file name and location of the virtual machine file in the mac system
7. Under construction, waited here for about an hour
Install Parallels Tools
1. Choose Install Parallels Tools from the menu
2. A CDROM will be automatically mounted
Unfortunately, double-clicking install-gui can not install it, nor can it be installed by running install from the command line. After searching online for a long time, I finally found an article that can perfectly solve this problem:
https://gist.github.com/rudolfratusinski/a4d9e3caff11a4d9d81d2e84abc9afbf
Here is the installation file modified in