Tag: android-ndk

Android camera native access : startPreview() vs startRecording()

Trying to get camera working from native code in Android ICS: most manuals refer to startPreview() method . But browsing AOSP code I’ve found also ‘startRecording()‘ method in <Camera.h>. Here said that it is from interface ICameraRecordingProxy “that allows the recorder to receive video frames during recording“ So the question is – in terms of […]

pjsip 2.5.5 build error

I’m trying to build pjsip for android with NDK r13b. Standard build like ./configure-android –with-opus=/home/user/pjsip/pjproject/opus-dev-lib works perfect. But i need several TARGET_ABI and all my tries to do it ends with configure-android error: compiler not found, please check environment settings (TARGET_ABI, etc) Commands as TARGET_ABI=armeabi-v7a ./configure-android –use-ndk-cflags –with-opus=/home/user/pjsip/pjproject/opus-dev-lib TARGET_ABI=armeabi-v7a APP_PLATFORM=android-21 ./configure-android –use-ndk-cflags –with-opus=/home/user/pjsip/pjproject/opus-dev-lib return the […]

Generate core dump in android

I’m developping a android‘s aplication using some shared libraries written by me and compiled with ndk-r5b. The application works, y and the calls to the libraries works too, but I detected some errors, segmentations faults, and I need to debug it, but, I don’t know how debug native code from android and I don’t know […]

using pre-built static libraries for Android NDK development

I am trying to build an android application that uses static libraries from some existing c++ code. However I cannot seem to get things building, here are the steps I have taken so far.. I have ndk-r5b and have built the standalone toolchain as per ndk/docs/STANDALINE-TOOLCHAIN.html. I have then used the standalone toolchain compiler (arm-linux-androideabi-g++) […]

How do you troubleshoot an Android system library crash (libwebcore.so)

My Android webview is crashing and the error dump from adb logcat tells me that libwebcore.so is the library causing the segmentation fault. How do you troubleshoot this? My initial research took me to places like this thread: How to use addr2line in Android, which in essence says to get the non-stripped version of the […]

Android L Preview does not search native libraries in “armeabi” folder (UnsatisfiedLinkError)

I have an app with 2 native libraries. 1st works much faster on ARMv7 so I have version both for ARMv7 and ARMv5. 2nd works the same on both platforms so only ARMv5 library is provided. My native library folder looks like this: /jniLibs/ | +—armeabi/ | | | +—libFirstLibrary.so | +—libSecondLibrary.so | +—armeabi-v7a/ | […]

Android – build separate APKs for different processor architectures

Is there an easy way to build separate APK files for Android for different processor architectures, with the old ANT or the new Gradle build process? My way of doing this is to build one “fat” APK with all supported native libraries included, and then splitting them into separate APK as I explained here. However, […]

OpenGL surface view scaling for different DPIs

I have a device with 800×480 res. When I create GLSurfaceView, I get an onSurfaceChanged call with 533×320 (apparently with 1.5 HDPI modifier applied) and surface is upscaled. So when I draw 1 pixel thick line is looks really bad, and I can’t have pixel-perfect rendering. What I want to have is native resolution surface […]

JNI ERROR (app bug): local reference table overflow (max=512)

I am trying to run the LibSVMAndroidClassification Android project with my own dataset. It works perfectly fine with the dataset already provided and it also works fine when I use my csv with 100 rows (which is less than 1% of original size). But when I try to go for “Train CSV” with for e.g […]

Android NDK - multlib support using gradle

My question is directed towards native Android development for 64bit Android systems. I am looking for a way to configure the support of 32bit compiled native libraries at a 64bit Android system using the gradle build system. The libraries the application should use are only available as 32bit build. It would be very time consuming […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.