Linphone会为Android不工作/缺少的库 [英] Linphone for android is not working/missing libraries

查看:874
本文介绍了Linphone会为Android不工作/缺少的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行Linphone会code这是我从 git的获得://git.linphone.org/linphone-android.git --recursive 。 成功下载后,我试图编译并运行它根据README文件。我用Cygwin的的自动工具,自动配置,Automake的,aclocal会,libtoolize和pkgconfig和放大器; Android的NDK r8d。

I am trying to run linphone code which I get from git://git.linphone.org/linphone-android.git --recursive . After downloading it successfully, I tried to compile and run it as per the README file. I used Cygwin for Autotools, Autoconfig, Automake, aclocal, libtoolize and pkgconfig & Android ndk r8d.

然后我执行 prepare_sources.sh shell脚本的cygwin其中下载了一些需要resuorces。

then I executed the prepare_sources.sh shell script in cygwin which downloaded some needed resuorces.

在以下所有步骤,当我试图运行code,我得到一个的UnsatisfiedLinkError 在运行时和应用程序崩溃的异常。

After following all the steps, when I tried to run the code I get an UnsatisfiedLinkError exception on runtime and application crashes.

我也得到logcat的知道,有些库是无法加载,由于其上面的异常发生了坠毁的应用程序。这里是logcat的输出:

I also get to know from logcat that some libraries are unable to load due to which the above exception took place and crashed the app. Here is the Logcat output :

02-26 10:03:55.739: W/Unable to load optional library lib(1084): avutil
02-26 10:03:55.749: W/Unable to load optional library lib(1084): swscale
02-26 10:03:55.759: W/Unable to load optional library lib(1084): avcore
02-26 10:03:55.769: W/dalvikvm(1084): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/linphone/core/LinphoneCoreFactoryImpl;
02-26 10:03:55.769: D/AndroidRuntime(1084): Shutting down VM

=============================================== ===================================

==================================================================================

02-26 10:03:55.769: W/dalvikvm(1084): threadid=1: thread exiting with uncaught exception (group=0x40a70930)
02-26 10:03:55.869: E/AndroidRuntime(1084): FATAL EXCEPTION: main
02-26 10:03:55.869: E/AndroidRuntime(1084): java.lang.ExceptionInInitializerError
02-26 10:03:55.869: E/AndroidRuntime(1084):     at java.lang.Class.classForName(Native Method)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at java.lang.Class.forName(Class.java:217)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at java.lang.Class.forName(Class.java:172)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at org.linphone.core.LinphoneCoreFactory.instance(LinphoneCoreFactory.java:43)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at org.linphone.LinphoneManager.startLibLinphone(LinphoneManager.java:417)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at org.linphone.LinphoneManager.createAndStart(LinphoneManager.java:226)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at org.linphone.LinphoneService.onCreate(LinphoneService.java:165)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2529)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at android.app.ActivityThread.access$1600(ActivityThread.java:141)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at android.os.Handler.dispatchMessage(Handler.java:99)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at android.os.Looper.loop(Looper.java:137)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at android.app.ActivityThread.main(ActivityThread.java:5039)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at java.lang.reflect.Method.invokeNative(Native Method)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at java.lang.reflect.Method.invoke(Method.java:511)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at dalvik.system.NativeStart.main(Native Method)
02-26 10:03:55.869: E/AndroidRuntime(1084): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load neon from loader dalvik.system.PathClassLoader[dexPath=/data/app/org.linphone-1.apk,libraryPath=/data/app-lib/org.linphone-1]: findLibrary returned null
02-26 10:03:55.869: E/AndroidRuntime(1084):     at java.lang.Runtime.loadLibrary(Runtime.java:365)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at java.lang.System.loadLibrary(System.java:535)
02-26 10:03:55.869: E/AndroidRuntime(1084):     at org.linphone.core.LinphoneCoreFactoryImpl.<clinit>(LinphoneCoreFactoryImpl.java:47)
02-26 10:03:55.869: E/AndroidRuntime(1084):     ... 18 more

任何人可以帮助我把它解决了。? 一个解决方案,大大AP preciated ..在此先感谢。

Can anybody help me to get it solved.? A solution for this, is greatly appreciated.. Thanks in advance.

推荐答案

第1

下面的步骤可以帮助您创建和您的设备或仿真器(测试在Mac)上安装编译:

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

第一步:你需要有Android SDK和NDK配置和istalled 还要安装自动工具Mac用户可以使用<一个href="http://www.gnu.org/software/automake/faq/autotools-faq.html#How-do-I-install-the-Autotools-_0028as-user_0029_003f">this链接(按照2.3点仅在链接) 其他平台的用户,请确保您正确安装。

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.

第二步::Mac用户打开你的终端和克隆你想要的任何目录的混帐回购协议  通过运行以下命令:(其它用户对不起,我不知道我怎么想,但你自己看着办吧了如何使用命令PROMT或任何你使用的是得到你的目录中的git回购)

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的克隆混帐://git.linphone.org/linphone-android.git --recursive

在获得回购复制到你的目录现在进入目录,打开README文件,并宣读了整个文件。

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.

第三步::现在,我们将按照书面的README文件中的指导 首先使用在终端中输入以下命令转到下载的工程的根目录下:

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

或只是使用简单的命令 CD 即可进入文件夹

   $ cd Desktop
   $ cd Android
   $ cd linphone-android

现在,当你进入终端上的目录,然后检查你的SDK和放大器的路径;安装在Mac上运行

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

$ echo $PATH

如果你看到SDK和NDK位置的路径,然后它的确定以继续第四步,然后跳到下面的部分,如果没有,那么你需要设置PATH你执行make和make install前脚本中第4步: 要设置路径的使用:

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 

这就像导出PATH =(您的SDK平台工具文件夹的路径):(路径的SDK工具文件夹):(你的NDK文件夹的路径):$ PATH

这将设置路径,并再次确认执行

This will set up the path and to confirm again run

$ echo $PATH

现在你会看到,SDK和NDK的路径是存在的。

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

现在您的设备连接到您的Mac / PC,检查Eclipse已经检测到它。 之后将设备连接运行:

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)

这将应用程序安装到您的手机。 (你需要有一个工作的SIP用户名和密码的应用配置)

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.

第2

导入到Eclipse中: 之后,你现在已经取得了您的版本,那么你需要将其导入到Eclipse中。

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

第一步:进入月食点击文件菜单,然后导入,然后选择  现有的Andr​​oid code到工作区

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

点击下一步,浏览到 Linphone会-机器人项目文件夹 而且,只有蜱Linphone会,安卓文件夹,并保留副本项目到工作区勾去掉。

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

做到像下面的图片:  

Do it Like the below image:

和命中完成。 现在,右键点击Linphone会,机器人(项目名称),并转到属性和Java构建路径,然后排序和导出,然后重新排序如下我的形象的勾去掉gcm.jar

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

点击确定 呯没有错误 现在只要在设备或模拟器上运行它。 (请确保你的最低目标SDK与您的设备或仿真器相匹配。)

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.

一切顺利!

这篇关于Linphone会为Android不工作/缺少的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆