1. Download linphone-android source code
Http://www.linphone.org/eng/download/git.html
The git address for linphone-android is:
Run the following command on the VM:
Git clone git: // git.linphone.org/linphone-android.git -- recursive
Remember to attach rescursive. Otherwise, it will be around MB after download.
Ii. Configure the relevant compiling environment
After downloading the SDK, check the readme file.
1) download the Android ndk (> = r5c) from google.
I am personally the latest version of the android-ndk-r7c. (how to install NDK can be found in this folder)
2) install the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
These took me one morning.
In fact, you can use apt-get install.
Sudo apt-get install autools-dev can automatically help you install autoconf, automake, and aclocal. then install libtoolize. Do not take sudo apt-get install libtoolize for granted.
The correct command is: sudo apt-get install libtool
Pkg-config system.
Check whether the related commands have been installed successfully:
Which autoconf (the which command is used to find what PATH points to and find its PATH). The command PATH is displayed successfully.
(3) copy the platform-tools and tools folders under the sdk directory to the root directory of the linphone-android source code;
(4) import the ndk PATH to the environment variable, for example, export PATH = $ PATH :~ /Linphones/android-ndk-r8d
3. Compile linphone-android
(1) After the above steps are completed, start to execute./prepare_sources.sh. (here I encountered a problem)
Problem:
1: indicates that the ndk path is incorrect.
Add your ndk path to/etc/environment.
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /home/hnzzh/huzi/linphone-android/package/android-ndk-r8"
Then restart source/etc/enviroment. If you run the following command: which ndk-build can see the path where nkd-build is located, it means no problem.
2: When./prepare_sources.sh is run, an error is prompted about the ndk permission. Therefore, you need to change all the ndk including subdirectories to the 777 permission.
After compilation, the following message is displayed:
Patching file Makefile
Hunk #1 succeeded at 47 with fuzz 2 (offset 21 lines ).
(2) run the following ndk-build command:
After the installation is complete, the following message is displayed:
Compile thumb: linphonenoneon <= ec-calibrator.c
SharedLibrary: liblinphonearmv5.so
Install: liblinphonearmv5.so => jni/.. // libs/armeabi/liblinphonearmv5.so
At this time, it will take about three minutes to compile successfully, and then there will be various so files compiled in the libs directory.
Armeabi/liblinphone. so
Armeabi-v7a/libavcodec. so, libavcore. so, libavutil. so, liblincrypto. so, liblinphone. so, liblinssl. so, libsrtp. so, libswscale. so!
At this point, the entire linphone installation is complete, and the next step is to use Eclipse to import!
Iv. Eclipse Import
(1) eclipse import android Project
Import the linphone_android directory in eclipse!
Assume that all @ Override needs to be removed from Ubuntu eclipse.