Linphone Android how to import the library project?

流过昼夜 提交于 2019-11-26 21:44:21

问题


I am working on SIP application and using Linphone Library. I am trying to make and run the build on the device but getting few issues

I have setup the Android SDK and NDK set up on my Mac. Now when i copy the repo via Terminal using command

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

And than to Makefile ran this code:

$make

and Then it show's Build Successfull.

Now i need to import this project into Eclipse and when i do this imported project (folder named "linphone-adroid") into my Eclipse it shows me alot's of projects i am confused which one should i use and if i choose all of them then it gives me lot's of errors in other's (Shown in image below)

liblinphone-android --> Ran this on Device runs fine but when i call the numbers it changes it's view and shows duration 0:00 and does not calls the numbers then i have to press hang off button to dismiss the call. (Not able to make call's)

Please suggest me how should i import this project into my eclipse and what else scripts i need to run on the terminal to make it run. So far what i have did is right or wrong?


回答1:


after building the library you have to import it in eclipse
File -> New -> Other... -> Android -> Android Project from Existing Code -> Browse_your_project

Now open your application (Project which have activity) and assign linphone library which you have earlier loaded....
Right click on your project -> select Android tab from left hand side -> from the bottom library section, click on "Add..." -> you will see the listed library which you have in your eclipse workspace -> select correct one -> click "OK" -> now refresh and clean the project -> build and try to run




回答2:


Yes , it worked finally. After build using "make" command.I installed in my device using "make install". Also generated sdk using "make linphone-sdk" And then simply imported in eclispe just like normal android project. Without any error it worked. - thank god.

In windows8 cygwin created many issues, so i did build the code using "make" command in MAC. And then simply imported in windows eclipse. (some admin permission issue in MAC) Note: android-ndk-R9c was failed my build. So then i tried with android-ndk-R9 without additional toolchain it worked great. Android-ndk old versions available at (http://page2rss.com/0dc3a880ab1762303011d69d18408917).




回答3:


check complete guide on linphone android on coders hub.




回答4:


As suggested by @bhavana I was doing wrong while importing the linphone-android project into my eclipse. The correct process is explained below-

Importing into Eclipse : After i have made the build then now i just need to import the project 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 linohone-android folder and Leave copy project into workspace untick Like the below image:

And hit finish. Now i right clicked 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

Hit OK And Boom No errors Now just run it on device or emulator. (Cross check minimum target SDK matches with the device or emulator.)

The above steps worked fine for me.



来源:https://stackoverflow.com/questions/18826876/linphone-android-how-to-import-the-library-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!