2

I think we can build it. But I am getting error to build it on Android Studio. First I download the Android Studio and NDK. Then add the PATH of Android Studio and NDK to the PATH Variable. When I run

./check_tools.sh

I get the output

Could not find automake. Please install it.
Could not find autoconf. Please install it.
Could not find pkg-config. Please install it.
Could not find ant. Please install it.
Could not find yasm. Please install it.
Could not find wget. Please install it.
Could not find libtoolize. Please install libtool.
Invalid version of nasm: your version does not support elf32 output format. If you have installed nasm, please check that your PATH env variable is set correctly.
Failed to detect required tools, aborting.

But i doubt whether i need these tool on Android Studio or not. When I run the project i get the error

java.lang.UnsatisfiedLinkError: Couldn't load linphone-armeabi-v7a: findLibrary returned null.

Can anybody tell me the solution for that.

Dan Albert
  • 10,079
  • 2
  • 36
  • 79
Joginder Sharma
  • 73
  • 4
  • 11
  • You've got the classic cross-compiler's headache compounded by being unfamiliar with the process. Your best practical bet would be to see if someone else has port process figured out. Otherwise, you may want to build it in (and targeting) a linux vm to get familiar with what is happening, before you try to cross build for a target on which these autoconfiguration steps can't run. – Chris Stratton Jan 24 '15 at 19:04
  • I found some tutorial for Eclipse but not a single for Android Studio.Its not the problem of Mac but Android Studio. – Joginder Sharma Jan 24 '15 at 20:38
  • Neither eclipse nor android studio is meaningfully involved; this is an issue with the project and the ndk toolchain. – Chris Stratton Jan 24 '15 at 20:41
  • The actual error message you post occur because your mac is not configured to build this project to run on a mac, but then that isn't what you are wanting to do. You will need to both install the missing tools and convince the project to build for android instead of the mac you are building on. – Chris Stratton Jan 24 '15 at 20:48
  • @ChrisStratton Thank you for your comment. Can you tell me how can i download the missing tool ? – Joginder Sharma Jan 27 '15 at 06:59
  • As I said in my first comment, I'd recommend you start by building this on linux for linux to gain understanding of the process of building the program (and the long list of tools it requires, appearing as your error messages) by doing so in its natural environment, before you try to port it. – Chris Stratton Jan 27 '15 at 08:34

3 Answers3

6

Yes you can do this follow the step by step guide at this blog

How to build culinphone on Android Studio using Mac OS X?

http://culinphone.wordpress.com

Here is a step to step guide. Setup Linphone Sdk on Mac OS X How to build Linphone in Android Studio on Mac? Step by step guide :-

Required Knowledge :- Android Tools Android Studio A little bit about mac-terminal(shell)

S/W Requirements:- Mac OS-X with these tools (You definetely need these tools to build linphone) :-

coreutils, automake, autoconf, libtool, intltool, wget, pkgconfig ,cmake, gmake, yasm, grep, doxygen, ImageMagick, optipng, antlr3

STEP 1:- Concerning these useful tools you can install the tools with this command

$sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3

STEP 2:-
Check out these Instructions how to upgrade nasm

STEP 3:- Then install ant by typing

brew update     #update if already installed
brew install ant

If you haven’t installed brew just type command give below

its a medium size download which takes 5 mins to download

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Just follow the process which involves installing various components. If you already have brew installed, make sure it’s up to date by executing:

brew update

Once installed you can simply type:

brew install ant  

STEP 4:- Now its time to install libtool. To install libtool run the command given below

 curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
 tar -xzf libtool-2.4.2.tar.gz
 cd libtool-2.4.2
 ./configure && make && sudo make install

STEP 5:- if you have not installed these programmes download and install Download Android Studio & SDK Download Android NDK

STEP 6:- Download git repository of LInphone Android by running command

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

Now everything is configured perfectly

STEP 7:- Open terminal and cd into 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 skip the below part and if not then you need to setup the PATH before you execute the make and make install script in

To setup path use:-

$export PATH=/Users/<yourusername>/android-sdks/platform-tools/:/Users//android-sdks/tools/:/Users//Documents/ndk/:/nobackup/local/prog/nasm/bin/:$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 if the Path is already setup you can simply run

$ make

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

$ make install

Now if everythink is OK:-

After you have made your build then now you can import it into your Android Studio.

Open Android Studio

Import Project (Eclipse,ADT,Gradle,etc.) > select linphone-android > OK

Sandeep Rana
  • 3,251
  • 2
  • 24
  • 38
0

I am able to build the limphone on mac by follow the steps describe here :-

Linphone for android is not working/missing libraries

Community
  • 1
  • 1
Joginder Sharma
  • 73
  • 4
  • 11
0

You definetely need these tools to build linphone. Concerning nasm I had the same problem. You can use this site that instructs you how to upgrade to a newer nasm:

Instructions how to upgrade nasm

Concerning other useful tools you can install the tools below with this command:

$sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3

All these are found in the linphone build instructions README.md file.

Vas Giatilis
  • 1,086
  • 12
  • 16