I'm trying to use pjsip library for sip telephony in an android device for different architectures on a MAC.
I have downloaded 2.5.5 from http://svn.pjsip.org/repos/pjproject/tags/2.5.5 which is build fine for armabi architectures with the corresponding libpjsua2.so.
I'm trying to build it for other architectures as well but with no much lack on it. I have followed the instructions from https://trac.pjsip.org/repos/wiki/Getting-Started/Android but I have different errors.
For instance having TARGET_ABI=armeabi-v7a ./configure-android --use-ndk-cflags I was getting at the beginning:
/Users/*****/Library/Android/sdk/ndk-bundle/samples/hello-jni: No such file or directory. Stop.
configure-android error: failed to run ndk-build, check ANDROID_NDK_ROOT env var
I downloaded the samples from github (as suggested in Android NDK) and now I get another error:
Users/iu/Library/Android/sdk/ndk-bundle/build/core/build-local.mk:151:
*** Android NDK: Aborting . Stop. ./configure-android: line 72: test: argument expected configure-android error: compiler not found,
please check environment settings (TARGET_ABI, etc)
Any suggestions?
Thanks
Just in case somebody has a similar issue. The way I solved it is by building it on a linux machine as described in
https://github.com/VoiSmart/pjsip-android-builder
For Android, I suggest, you build pjsip 2.6.
And yes, build it on Linux.
It has fixed many SIGSEG errors that occurred in 5.x versions.
Since we switched to 2.6 the stability of our app increased significantly.
It may happen, that another build issue arises with 2.6 that correlates with libYUV if you compile together with openSSL.
If you do not need video, disable it in the build (config_site.h).
Related
I am trying to integrate Boost.Log in a QT/QML project that has to work on Windows, Linux and Android. While Win32 and Linux versions work like a charm, Android is giving me a few headaches.
I was able to build Boost library following instructions at https://github.com/moritz-wundke/Boost-for-Android.
However,
If I link my application statically to boost libraries, I get a bunch of linker errors, complaining that symbols are not found. Error messages are like: "error: undefined reference to 'boost::log::v2_mt_posix::core::get()', I get ~60 of them and I checked many times the file paths
If I link dynamically to boost, I can successfully generate my APK (the relevant .so files are included) but it crashes upon startup, both on a real device and on Android emulator
I'm new to Android development so it's entirely possible that I'm missing some key step here and I'm not really sure on what information may be relevant to provide here. Hope that someone can help.
I tried building with both ndk 20 and 21, Boost 1.70, Android SDK 26.
I plan to use QT 5.12 but did not add any QT code yet. I used QT Creator 4.10.2 (Windows) and 4.11.1 (Linux)
Trying to build pjsip version 2.8 for android, downloaded from here : http://www.pjsip.org/download.htm
Following below article to build for different ABI archs
https://trac.pjsip.org/repos/wiki/Getting-Started/Android
followed 1,2,3 steps for building, i am able to build for arm64-v8a but its failing for armeabi-v7a, x86_64.
shows error as
/root/abcd/android-ndk-r16b/build/core/build-shared-library.mk:23: *** Android NDK: Please correct error. Aborting . Stop.
NDK_CC :
configure-android error: compiler not found, please check environment settings (TARGET_ABI, etc)
I tried below thread solution,but it is'nt working now for many people, show that in the comment.
Error While building PJSiP in Android
Finally i was able to build for different architecture using the Ndk r16 without using NDK_TOOLCHAIN_VERSION=4.9
i had followed this article completely.
https://trac.pjsip.org/repos/wiki/Getting-Started/Android
issue was that after building for one architecture, lets say armeabi-v7a
i was not able to build for another architecture arm64-v8a.
Solution was, i have to perform clean up process exactly and perfectly, if cleanup doesn't happens properly, then next build doesn't happens properly
See here-> link in detail for the cleanup process
point number -> 4
I'm trying to debug some native Android code built through the NDK. Unfortunately, when I launch the process under the debugger from Eclipse I get an error
I'm sorry, Dave, I can't do that. Symbol format `elf32-littlearm' unknown.
The code is compiled for ARM thumb so the symbol format makes sense. However, using Google's bundled ADT for Eclipse should work? Do I need to specify a specific version of GDB to use?
To note, the code runs fine without trying to debug.
I'm running on Windows 7 64 bit with NDK release 10.
After some searching it looks like it is a bug with the GDB shipped with the NDK r10 toolchain. See https://code.google.com/p/android/issues/detail?id=74371. The download linked from that bug seems to work for me.
I am trying to deploy a Qt app to an Android device, though I receive the error about missing stdlib.h. I found out that this library is actually inside sub directory tr1 of includes. I modified the include<stdlib.h> to include<tr1/stdlib.h>. After this I encountered the error for locale.h. This files doesn't seem to be present anywhere in the NDK.
The app works fine if build for Desktop as the Linux GCC has all files in proper hierarchy.
Any fixes?
Finally, I resolved the issue. It was just the wrong Android NDK build I downloaded. My system architecture is x86_64 and the Android architecture is x86. The build I downloaded was that x86_64 Android. Make sure when downloading the target platform is your Android architecture.
Also, one might find several solutions recommending to create stand-alone build using make-standalone-toolchain.sh script and setting CXX home to this build and as well as set "sysroot". Please do not do it. It's not at all required. Just set the NDK path from Android option from Qt itself. That shall be enough.
I have download code this link
Import this project and convert it in to C / C ++ native project.
And also set Builder Settings to Build Command
bash C:\tools\android-ndk-r8b-windows\android-ndk-r8b\ndk-build
After run project then i am getting below Error.
make: *** Android NDK: Aborting . Stop. FFmpegTest
C:\tools\android-ndk-r5b\build\core\prebuilt-library.mk
I am develop above application in Windows 7 64 bit and Eclipse Juno.
Please guide me to resolved my Error.
Thanks
I was never able to compile ffmpeg for Android following the link you have posted (though I've heard others did succeed) same as I was never able to compile ffmpeg for Android under windows.
I have easily compiled ffmpeg under ubuntu using the following code
http://code.google.com/p/dolphin-player/.
Just go to
dolphin-player/p/native/ffmpeg/ffmpeg-0.11.1 and run build_android_r8.sh from there
Once compiled under unix you can then use the resulting *.so under windows.
You can emulate unix under windows using something like the free VirtualBox.
You can avoid compiling altogether by grabbing one of dolphin-player's apks (suitable for your architecture) renaming it into zip and extracting libffmeg.so from there.