Linphone for android不工作/缺少库

Linphone for android不工作/缺少库,android,sip,linphone,Android,Sip,Linphone,我正在尝试运行从git://git.linphone.org/linphone-android.git --递归的。 成功下载后,我尝试按照自述文件编译并运行它。我将Cygwin用于Autotools、Autoconfig、Automake、aclocal、libtoolize和pkgconfig&Android ndk r8d 然后,我在cygwin中执行了prepare_sources.shshell脚本,其中下载了一些所需的资源 在完成所有步骤之后,当我尝试运行代码时,在运行时和应用程序崩

我正在尝试运行从git://git.linphone.org/linphone-android.git --递归的。 成功下载后,我尝试按照自述文件编译并运行它。我将Cygwin用于Autotools、Autoconfig、Automake、aclocal、libtoolize和pkgconfig&Android ndk r8d

然后,我在cygwin中执行了prepare_sources.shshell脚本,其中下载了一些所需的资源

在完成所有步骤之后,当我尝试运行代码时,在运行时和应用程序崩溃时出现了一个未满足的linkerror异常

我还从logcat了解到,由于出现上述异常并导致应用程序崩溃,一些库无法加载。以下是Logcat输出:

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
02-26 10:03:55.769:W/dalvikvm(1084):threadid=1:线程以未捕获异常退出(组=0x40a70930)
02-26 10:03:55.869:E/AndroidRuntime(1084):致命异常:主
02-26 10:03:55.869:E/AndroidRuntime(1084):java.lang.ExceptionInInitializeError
02-26 10:03:55.869:E/AndroidRuntime(1084):位于java.lang.Class.classForName(本机方法)
02-26 10:03:55.869:E/AndroidRuntime(1084):在java.lang.Class.forName(Class.java:217)中
02-26 10:03:55.869:E/AndroidRuntime(1084):在java.lang.Class.forName(Class.java:172)中
02-26 10:03:55.869:E/AndroidRuntime(1084):位于org.linphone.core.LinphoneCoreFactory.instance(LinphoneCoreFactory.java:43)
02-26 10:03:55.869:E/AndroidRuntime(1084):在org.linphone.LinphoneManager.startiblinphone(LinphoneManager.java:417)
02-26 10:03:55.869:E/AndroidRuntime(1084):在org.linphone.LinphoneManager.createAndStart(LinphoneManager.java:226)上
02-26 10:03:55.869:E/AndroidRuntime(1084):在org.linphone.LinphoneService.onCreate(LinphoneService.java:165)上
02-26 10:03:55.869:E/AndroidRuntime(1084):在android.app.ActivityThread.handleCreateService(ActivityThread.java:2529)上
02-26 10:03:55.869:E/AndroidRuntime(1084):在android.app.ActivityThread.access$1600(ActivityThread.java:141)
02-26 10:03:55.869:E/AndroidRuntime(1084):在android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
02-26 10:03:55.869:E/AndroidRuntime(1084):在android.os.Handler.dispatchMessage(Handler.java:99)上
02-26 10:03:55.869:E/AndroidRuntime(1084):在android.os.Looper.loop(Looper.java:137)
02-26 10:03:55.869:E/AndroidRuntime(1084):在android.app.ActivityThread.main(ActivityThread.java:5039)上
02-26 10:03:55.869:E/AndroidRuntime(1084):位于java.lang.reflect.Method.Invokenactive(本机方法)
02-26 10:03:55.869:E/AndroidRuntime(1084):位于java.lang.reflect.Method.invoke(Method.java:511)
02-26 10:03:55.869:E/AndroidRuntime(1084):在com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-26 10:03:55.869:E/AndroidRuntime(1084):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-26 10:03:55.869:E/AndroidRuntime(1084):在dalvik.system.NativeStart.main(本机方法)
02-26 10:03:55.869:E/AndroidRuntime(1084):原因:java.lang.UnsatifiedLink错误:无法从加载程序dalvik.system.PathClassLoader加载neon[dexPath=/data/app/org.linphone-1.apk,libraryPath=/data/app lib/org.linphone-1]:findLibrary返回null
02-26 10:03:55.869:E/AndroidRuntime(1084):在java.lang.Runtime.loadLibrary(Runtime.java:365)上
02-26 10:03:55.869:E/AndroidRuntime(1084):位于java.lang.System.loadLibrary(System.java:535)
02-26 10:03:55.869:E/AndroidRuntime(1084):位于org.linphone.core.LinphoneCoreFactoryImpl.(LinphoneCoreFactoryImpl.java:47)
02-26 10:03:55.869:E/AndroidRuntime(1084):。。。还有18个
有人能帮我解决吗。?
对此,我们非常感谢您的解决方案。。提前感谢。

问题在于您缺少本机neon库,或者更具体地说,缺少“libneon.so”

要解决此问题,您必须使用下载的linphone源构建neon库(“libneon.so”)

假设你有源代码,android sdk,ndk,autotools,。。。(如果没有,请按照项目目录中的自述文件进行操作),转到项目目录:

  • 运行:./prepare_sources.sh
  • 运行:ndk构建
  • 如果一切顺利,您应该编译neon库(“libneon.so”)。一旦完成,您应该修复您的问题(如果仍然出现错误,请确保您的库位于java.library.path中)

    有关如何加载Java本机/共享库(.so)的更多信息,请访问以下链接:
    第一部分

    以下步骤可以帮助您在设备或模拟器(在Mac上测试)上创建和安装构建:

    步骤1:您需要配置并安装Android SDK和NDK 同时安装Autotools Mac用户可以使用链接(仅在链接中遵循第2.3点) 其他平台用户请确保安装正确

    步骤2:Mac用户打开您的终端,在您想要的任何目录上克隆git repo 通过运行以下命令:(其他用户抱歉,我不知道如何操作,但我认为您可以了解如何使用命令promt或您正在使用的任何东西在您的目录上获取git repo)

    $git克隆git://git.linphone.org/linphone-android.git --递归的

    在您将Repo复制到您的目录后,现在转到该目录,打开自述文件并读取整个文件

    步骤3:现在我们将按照自述文件中的说明进行操作 首先在终端上使用以下命令转到已下载项目的根目录:

    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
    
    现在,当您进入终端上的目录时,请检查安装在Mac上的SDK和NDK的路径

    $ echo $PATH
    
    如果你看到t
    $ 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 
    
    $ echo $PATH
    
    $ make
    
    $ make install
    
    $ make generate-sdk (optional)