Hello, everyone. My problem is when i run csipsimple, it reports can't
find native library. I describe all my steps following in detail, wish
your help, thanks.My linux OS is ubuntu10.04, and ndk is r6.
1. I installed packages, subversion, git, quilt, unzip, wget, swig2.0,
python, make and yasm.
2. I unzip NDK at /usr/local/android:
$ sudo mkdir /usr/local/android
$ sudo tar -zxvf android-ndk-r6-crystax-2-linux-x86.tar /usr/local/
android
because i only build native library on ubuntu, so i didn't install
SDK
3. Modify environment setting:
$ sudo vim /etc/environment
then append the path of ndk, /usr/local/android/android-ndk-r6-
crystax-2, to PATH
4. Modify .bashrc, append following lines to it:
export ANDROID_NDK=/usr/local/android/android-ndk-r6-crystax-2/
export PATH=$PATH:$ANDROID_NDK
because i only build native library on ubuntu, so i haven't added
other lines which is about SDK. But, i think this step is identical to
steps 2 and 3.
5. I check out the source code:
$ mkdir ~/csipsimple
$ cd ~/csipsimple
$ svn checkout
http://csipsimple.googlecode.com/svn/trunk/CSipSimple/
csipsimple
6. Make the source:
$ cd csipsimple
$ make SWIG=swig
7. Create Local.mk:
$ vim jni/Local.mk
then input lines: APP_OPTIM := debug
8. Build native library:
$ ndk-build
9. Unzip csipsimple on Windows, and checkout ActionBarSherlock, then
import the two project in Eclipse.
10. Copy native library to csipsimple project root directory, it likes
this:
csipsimple
├─.externalToolBuilders
├─.tx
├─art
├─assets
├─bin
├─gen
├─jni
├─libs
│ ├─armeabi
│ └─armeabi-v7a
├─res
└─src
11. Build and install the apk onto my cellphone which is android 2.2
in Eclipse.
When the apk is runing, logs from Eclipse's logcat show error:
05-29 09:41:29.173: E/PjService(1060): We have a problem with the
current stack.... NOT YET Implemented
05-29 09:41:29.173: E/PjService(1060): java.lang.UnsatisfiedLinkError:
Library pjsipjni not found
05-29 09:41:29.173: E/PjService(1060): at
java.lang.Runtime.loadLibrary(Runtime.java:461)
05-29 09:41:29.173: E/PjService(1060): at
java.lang.System.loadLibrary(System.java:557)
05-29 09:41:29.173: E/PjService(1060): at
com.csipsimple.pjsip.PjSipService.tryToLoadStack(PjSipService.java:
139)
05-29 09:41:29.173: E/PjService(1060): at
com.csipsimple.service.SipService.loadStack(SipService.java:1037)
05-29 09:41:29.173: E/PjService(1060): at
com.csipsimple.service.SipService.onStart(SipService.java:960)
05-29 09:41:29.173: E/PjService(1060): at
android.app.Service.onStartCommand(Service.java:420)
05-29 09:41:29.173: E/PjService(1060): at
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3095)
05-29 09:41:29.173: E/PjService(1060): at
android.app.ActivityThread.access$3600(ActivityThread.java:132)
05-29 09:41:29.173: E/PjService(1060): at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:2134)
05-29 09:41:29.173: E/PjService(1060): at
android.os.Handler.dispatchMessage(Handler.java:99)
05-29 09:41:29.173: E/PjService(1060): at
android.os.Looper.loop(Looper.java:123)
05-29 09:41:29.173: E/PjService(1060): at
android.app.ActivityThread.main(ActivityThread.java:4669)
05-29 09:41:29.173: E/PjService(1060): at
java.lang.reflect.Method.invokeNative(Native Method)
05-29 09:41:29.173: E/PjService(1060): at
java.lang.reflect.Method.invoke(Method.java:521)
05-29 09:41:29.173: E/PjService(1060): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:876)
05-29 09:41:29.173: E/PjService(1060): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
05-29 09:41:29.173: E/PjService(1060): at
dalvik.system.NativeStart.main(Native Method)
So, these are all steps, please help me, thanks.