0

Im trying to run linphone source code in Windows 7, i git cloned the linphone source. there were no error... but when i try to run it on my Galaxy S it gives crashes the app, then i search it on Google and found the same crash reported,

Unable to run Linphone-android source code on actual device 04-09 11:19:37.332: E/AndroidRuntime(9930): FATAL EXCEPTION: main 04-09 11:19:37.332: E/AndroidRuntime(9930): java.lang.ExceptionInInitializerError 04-09 11:19:37.332: E/AndroidRuntime(9930): at java.lang.Class.classForName(Native Method) 04-09 11:19:37.332: E/AndroidRuntime(9930): at java.lang.Class.forName(Class.java:234) 04-09 11:19:37.332: E/AndroidRuntime(9930): at java.lang.Class.forName(Class.java:181) 04-09 11:19:37.332: E/AndroidRuntime(9930): at org.linphone.core.LinphoneCoreFactory.instance(LinphoneCoreFactory.java:43) 04-09 11:19:37.332: E/AndroidRuntime(9930): at org.linphone.LinphoneManager.startLibLinphone(LinphoneManager.java:460) 04-09 11:19:37.332: E/AndroidRuntime(9930): at org.linphone.LinphoneManager.createAndStart(LinphoneManager.java:271) 04-09 11:19:37.332: E/AndroidRuntime(9930): at org.linphone.LinphoneService.onCreate(LinphoneService.java:142) 04-09 11:19:37.332: E/AndroidRuntime(9930): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2208) 04-09 11:19:37.332: E/AndroidRuntime(9930): at android.app.ActivityThread.access$2500(ActivityThread.java:132) 04-09 11:19:37.332: E/AndroidRuntime(9930): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1102) 04-09 11:19:37.332: E/AndroidRuntime(9930): at android.os.Handler.dispatchMessage(Handler.java:99) 04-09 11:19:37.332: E/AndroidRuntime(9930): at android.os.Looper.loop(Looper.java:143) 04-09 11:19:37.332: E/AndroidRuntime(9930): at android.app.ActivityThread.main(ActivityThread.java:4277) 04-09 11:19:37.332: E/AndroidRuntime(9930): at java.lang.reflect.Method.invokeNative(Native Method) 04-09 11:19:37.332: E/AndroidRuntime(9930): at java.lang.reflect.Method.invoke(Method.java:507) 04-09 11:19:37.332: E/AndroidRuntime(9930): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 04-09 11:19:37.332: E/AndroidRuntime(9930): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 04-09 11:19:37.332: E/AndroidRuntime(9930): at dalvik.system.NativeStart.main(Native Method) 04-09 11:19:37.332: E/AndroidRuntime(9930): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load linphone: findLibrary returned null 04-09 11:19:37.332: E/AndroidRuntime(9930): at java.lang.Runtime.loadLibrary(Runtime.java:429) 04-09 11:19:37.332: E/AndroidRuntime(9930): at java.lang.System.loadLibrary(System.java:554) 04-09 11:19:37.332: E/AndroidRuntime(9930): at org.linphone.core.LinphoneCoreFactoryImpl.<clinit>(LinphoneCoreFactoryImpl.java:59) 04-09 11:19:37.332: E/AndroidRuntime(9930): ... 18 more

But i could not find a solution mention here.. what are the native lib which require to download?? i did not install these autotools mentioned, how can i get them... please help me...

Community
  • 1
  • 1

2 Answers2

2

You need to install the Android SDK and NDK

SDK: http://developer.android.com/sdk/index.html?utm_source=weibolife NDK: https://developer.android.com/tools/sdk/ndk/index.html (native lib)

Important: you have to set the path in the system. For Win 7 -> How to add android tools dir to windows 7 path?

If the path is not right you will get some errors like "Android NDK not found" ..

In the root folder from linphone you will find a readme. Follow the steps. Maybe you have to use linux or mac. I dont know if its work on Win 7 well.

Let me know if its worked.

Greetz

Community
  • 1
  • 1
PiOsA
  • 135
  • 9
  • Thanks for answering...i downloaded cygwin again with the autotools installed. and try to run source prepare_sources.sh in cygwing bash shell, then it shows the ./autogen.sh : No such file or directory – Kasun Wanniarachchi Feb 18 '14 at 06:00
  • Don't use prepare_sources.sh - it's deprecated. Use **make**. Be sure that you the the path to sdk and ndk. With **make install** you can install the linphone app on your device, and with **make linphone-sdk** you can create the library for use. – PiOsA Feb 18 '14 at 07:46
  • I used **make linphone-sdk** using my cygwin shell to the path of my linphone source cloned in git repository. but it give the error of **make: No rule to make target 'linphone-sdk'. Stop.**. SDK and NDK paths are already set in Environmental Variables, what would i do?? – Kasun Wanniarachchi Feb 19 '14 at 03:32
  • Did you run only **make** first? – PiOsA Feb 19 '14 at 15:30
  • i did that too... cursor blinks for few seconds and it gives me this error, **--/bin/sh: line 1: ./autogen.sh: No such file or directory --iLBC prepare stage failed --Makefile:18: recipe for target 'prepare-ilbc' failed --make: [prepare-ilbc] Error 1** – Kasun Wanniarachchi Feb 20 '14 at 04:44
  • That looks like that autogen isn't installed. Sry, i have no experience with Windows and Cygwin. Please check that the Packages from the top of the README are installed. – PiOsA Feb 20 '14 at 08:02
0

Failed to build linphone android source After few days of trying on windows7(using cygwin, autotools). But succeeded after using a MAC to build.

answer of this question has all the steps which required. Linphone for android is not working/missing libraries

Community
  • 1
  • 1