Question

I am building Linphone application for android. I am using windows xp 32 bit.

1) Download android ndk 2) Installed the autotools: autoconf, automake, aclocal, libtoolize pkgconfig 3) run the ./prepare_sources.sh/

I got the output in terminal as

$ ./prepare_sources.sh /cygdrive/d/android/androidNdk/android-ndk-r8d using /cygdrive/d/android/androidNdk/android-ndk-r8d as android NDK ./prepare_sources.sh: line 23: git: command not found Applying patch to ffmpeg can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

|--- submodules/externals/ffmpeg/libavcodec/arm/int_neon.S.orig 2011-09-30 19:43:21.935593025 +0200

|+++ submodules/externals/ffmpeg/libavcodec/arm/int_neon.S 2011-09-30 19:44:21.115168033 +0200

File to patch:

Any info, questions or anything really is highly appreciated

Was it helpful?

Solution 2

According to README in root dir of linphone-android you don't need to run prepare_sources.sh, remaining steps for you is to run "make" and "make install":

LINPHONE for ANDROID
**************

To build liblinphone for Android, you must:
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
1) download the Android ndk (>=r8b) from google and add it to your path.
2) install the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig 2bis) on some 64 bits systems you'll need the ia32-libs package
3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
$ make
4) To install the generated apk into a plugged device, run
$ make install

OTHER TIPS

Part 1

The following steps can help you create and install the build on your device or emulator(Tested on Mac):

Step1: you need to have the Android SDK and NDK configured and istalled Also install Autotools Mac users can use this link (Follow point 2.3 only in the link) Other platform users please make sure you install it correctly.

Step2: Mac users open up your terminal and clone the git repo on any directory you want to by running the following command: (Other users sorry i don't know how but i think you can figure it out that how you can get the git repo on your directory using command promt or whatever you are using)

$ git clone git://git.linphone.org/linphone-android.git --recursive

After you get the Repo copied into your directory now go to the directory and open the README file and read out the whole file.

Step3: Now we will follow as the instructions written in README file First Go to root directory of the downloaded project using the following command on Terminal:

Mac users on terminal write cd and 
then drag and drop the "linphone-android" folder on terminal 
(when you drag and drop the folder terminal will get the path of the folder and then you can hit enter to get into the directory of that folder) 

$ cd /Users/myname/Desktop/Android/linphone-android

or just use simple command cd to get into the folder

   $ cd Desktop
   $ cd Android
   $ cd linphone-android

Now when you get into the directory on terminal then check your PATH of SDK & NDK installed on your Mac run

$ echo $PATH

if you see the path with SDK and NDK location then it's ok to proceed with Step4 and skip the below part and if not then you need to setup the PATH before you execute the make and make install script in Step 4: To set up path use :

$ export PATH=/Users/myname/Documents/adt-bundle-mac-x86_64-20130729/sdk/platform-tools:/Users/myname/Documents/adt-bundle-mac-x86_64-20130729/sdk/tools:/Users/myname/Documents/android-ndk-r9:$PATH 

it's like export PATH=(Path of your SDK platform tools folder):(Path of your SDK tools folder):(Path of your NDK folder):$PATH

This will set up the path and to confirm again run

$ echo $PATH

Now you will see that the path of SDK and NDK is there.

Step 4: Now if the Path is already setup you can simply run

$ make

Now connect your Device to you Mac/Pc and see if eclipse has detected it. After the device is connected run:

$ make install

$ make generate-sdk (optional)

This will install the application into your phone. (you need to have an working SIP username and password to configure in the app)

This above steps worked for me and i was able to get the app running on my device.

Part 2

Importing into Eclipse : After you have made your build then now you need to import it into eclipse.

Step1: Go to eclipse click on File Menu then Import then select Existing Android Code into Workspace

Hit Next and Browse to the linphone-android project folder And Only tick linphone-android folder and Leave Copy project into workspace untick.

Do this Like the below image: enter image description here

And hit finish. Now you right click on "linphone-android" (project name) and go to Properties and Java Build Path and then Order and Export and then reorder them as my image below and untick gcm.jar

enter image description here

Hit OK And Boom No errors Now just run it on device or emulator. (Make sure your minimum target SDK matches with your device or emulator.)

The above steps worked fine for me and it will work for you as well.

All the Best !!

Existing answers shows how to build old linphone but to Build Latest Linphone for Android You can follow these Steps:

1) First Download Android SDK (at least API 16 is needed)

2) Then Download Android NDK(>=r9d) from Google.

3) Then Install cmake, python, yasm nasm Dependencies which is further required while installing Linphone. you can install these tool through Terminal.

4) Then You have to download source code of Linphone using following command:

git clone git://git.linphone.org/linphone-android.git --recursive 

5) After Downloading Source code You have to set Path of Android SDK,NDK and also JDK in Android SDK You have to give path upto Tools. For Example : in console type following command

export SDK_PATH=/home/rajesh/android/adt_bundle/sdk
export NDK_PATH=/home/rajesh/android/android-ndk-r10c
export JDK_PATH=/usr/lib/jvm/java-7-openjdk-i386/
export PATH=$PATH:$NDK_PATH:$SDK_PATH/platform-tools:$SDK_PATH/tools:$JDK_PATH

6) After setting path you have to navigate through Linphone directory and type command “./prepare.py” then This will configure the build and generate a Makefile in the top level directory.

If you get following error: CMake Error Could not find the intltoolize program then Refer

http://lists.nongnu.org/archive/html/linphone-users/2015-07/msg00092.html

7) After setting path you have to navigate through Linphone directory and type command “make” then it will generate apk for Linphone.

8) To generate a liblinphone SDK zip containing a full jar and native libraries, run

$ make liblinphone-android-sdk

I hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top