android-ndk , Android armeabi devices with API level 15+

Android armeabi devices with API level 15+


Tag: android-ndk

I'm developing an app for API level 15+ that has some jni code and i'm wondering if there are devices with armeabi ABI (ARMv5) and API level 15+

Can i include only armeabi-v7a and x86 libraries and skip the old armeabi?


AOSP itself doesn't support ARM versions below ARMv7 from Android 4.0 (API level 15), but there are custom builds that run on ARMv6. I'm not entirely sure if there are any official, certified compatible devices that run such a combination though.

So in practice you should be pretty safe to skip it, but you might exclude some fringe third party ROMs by doing that.

See for a similar answer to a similar question.


How can I link cpufeatures lib for a native android library?

I'm trying to link android's cpu_features to a native library. I'm using android's gcc compiler directly as a cross compiler. (NOT ndk-build). I've included the header ($NDK_PATH/sources/android/cpufeatures/cpu-features.h), but i don't see a prebuilt libcpufeatures.a file anywhere under the ndk folder. How can I build that library? Or where can it...

How do i call C/C++ code from Android using JNA?

I'm trying to integrate this specific library to my Android project, and the library is written in C/C++. I've miraculously gotten ndk-build to give me the needed .so file. However, looking at it, there's a sample in the project, and they use a mysterious .jar with the API bindings of...

error: conflicting types using C in android ndk

I am working on android application in which i am using ndk to make my native C code in java. My C and java file code is given below, i am getting error on the compilation time for conflicting types. My code is given below, please help me out here....

Set Android NDK globally in Android Studio

The current version ( of Android Studio allows me to build sample apps using the NDK, but I have noticed that each time I load a new project, I must set ndk.dir=/path/to/ndk/install in my file for Gradle to detect the NDK, whereas the sdk path is auto-populated. Is there...

Infinite rebuild loop in Eclipse CDT

My setup is a bit sketchy, I'll admit. This was working correctly with Eclipse Indigo but Luna keeps rebuilding my C++ Android project over and over. This happens when I select the "Build on resource save (Auto build)" which was rather convenient. Checking this option gets me into an infinite...

Android : Loading pre-built library - Circular dependency dropped

I am trying to import a module into my project. in module: LOCAL_PATH := $(call my-dir) include $(CEAR_VARS) LOCAL_MODULE := fromhere1 LOCAL_MODULE_FILENAME := fromhere1 LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/ include $(PREBUILT_SHARED_LIBRARY) is built by ndk-build in my project: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := native LOCAL_MODULE_FILENAME :=...

Faster alternative for getPixel and getPixel in Android Bitmap?

I'm using the methods getPixel and setPixel for my Bitmap and it's so slow (getPixels too). I want to process every pixel of the Bitmap and then create another Bitmap. How can I get access to pixels by RenderScript or using C++? I think they are faster but I don't...

Readelf reports program is a shared library instead of executable

got this strange behaviour with standalone Android NDK r10e Toolchain (built with --toolchain=x86-clang3.6 switch). Environment variables for cross compilation have been set before running makefile, SYSROOT points to Android toolchain location, CXX equals i686-linux-android-clang++. Basically, I have a bunch of cpp files that I would like to compile to Android...

How to upscale and render remote(RGB565) frame buffer on Android native?

I have ported remote frame buffer receive C code on Android 4.2.2 which receives frame buffer from host in RGB565 format. Able to render the received framebuffer following the standard android example frameworks/native/services/surfaceflinger/tests/resize/resize.cpp. Following is the code snippet used sp<Surface> surface = client->createSurface(String8("resize"), 800, 480, PIXEL_FORMAT_RGB_565, 0); SurfaceComposerClient::openGlobalTransaction(); surface->setLayer(100000); SurfaceComposerClient::closeGlobalTransaction();...

How to render a 3D file using Assimp library [closed]

I am working on an android project, in which I need to render 3D file. I have decided to use Assimp library after a lot of research. I have successfully compiled Assimp library.. But I am not able to render a file using it. There is not much documentation available...

java.lang.UnsatisfiedLinkError: Native method not found: com.ziqitza.murgency.activities.FibLib.getTestString:()Ljava/lang/String;

I am working on android-ndk application in which i am making on native String method to return me the string value. Library compiles without any error but on run time it gives me an exception that : java.lang.UnsatisfiedLinkError: Native method not found: com.ziqitza.murgency.activities.FibLib.getTestString:()Ljava/lang/String; My code for C and Header file...

Qt does not detect Android NDK

I want to develop Android apps with Qt. I have Extracted the Android SDK and NDK to C:\. This is the NDK I downloaded: But Qt 5.2.1 does not detect the NDK and this error is shown: "C:\android-ndk-1.6_r1" does not seem to be an Android NDK top folder. Do...

Is using largeheap in Android manifest a good practice?

I am developing in NDK. It hangs in Galaxy S3. For testing I put android:largeheap = "true" in Manifest. Then there was no hanging issue. Is it a good practice to use largeHeap="true"? Is there any chance that Google rejects my build due to this tag and how can I...

java.lang.UnsatisfiedLinkError - NDK in android studio gradle?

Folder structure app ---main ---java ----jni ----- hello-jni.c ---res in build.gradle apply plugin: '' android { compileSdkVersion 21 buildToolsVersion "22.0.1" defaultConfig { applicationId "com.example.hellojni" minSdkVersion 17 targetSdkVersion 21 sourceSets.main { jni.srcDirs = [] jniLibs.srcDir 'src/main/libs' } ndk { moduleName "hello-jni" cFlags "-std=c++11 -fexceptions" ldLibs "log" stl "gnustl_shared" abiFilter...

NDK & Android Studio, compiling it crashes because of shared libraries

For code reusing I had to move some native code from the working directory to a shared library. This movement however causes a lot of troubles. If I try to compile it in the old place, everything just clicks, instead if I try to compile it with the same data...

SurfaceView on Android 2.3.6 doesn't render full region

In my app I create SurfaceView and use it from NDK using ANativeWindow API: ANativeWindow_lock and then ANativeWindow_unlockAndPost. The size of the surface is set by ANativeWindow_setBuffersGeometry to 320x480. The screen size is bigger - 480x800. The SurfaceView is stretched using LayoutParams to almost full screen. The problem that I...

What is the difference between normal method call from native method call?

//my class class NDKSupport { // Loding library static { System.loadLibrary("NDKTest"); } // Stuff in NDKSupport public native String getMessageFromNDK(NDKSupport support); public String getMessage() { // doing some stuff over here return "SOME RESULT"; } } //Native code JNIEXPORT jstring JNICALL Java_com_afbb_ndkcheck_NDKSupport_getMessageFromNDK( JNIEnv* env, jobject thiz, jobject ndkSupport) { jclass...

ndk-build outputs ‘error adding symbols. File in wrong format’

I want to use exiv2 library written in C++ in my Android project. To do that I try to cross-compile the library using Android NDK. For cross-compiling I follow presented below steps: Add the ndk path to variable PATH $ PATH="/home/patrycja/android-packages/ndk:${PATH}" $ export PATH Install the standard toolchain for cross-compiling...

Multiple apk versionCode distinction

I have an application that supports both x86 and arm-v7 platforms. I should define different android:versionCode for different platform apks. Therefore I put for example 100 and 200 in value and upload an apk to Google Play. The issue in devices that support both platforms. If a device on x86...

How to write the script?

jni/ -> folder1/ -> folder2/ -> How to compile the and into the Thus, I can only load in the java code, and needn't load and respectively....

tess-two reciving int but waiting for long

I tried to rebuild an android app wich contains tess-two as library. When using as is, I get this error java.lang.NoSuchFieldError: no field with name='mNativeData' signature='I' in class Lcom/googlecode/tesseract/android/TessBaseAPI; When reverting commit bc931c966f5a05745bd4be5833f551643589982d (private long mNativeData; changed to private int mNativeData;) It then works. It might be related to my...

Android armeabi devices with API level 15+

I'm developing an app for API level 15+ that has some jni code and i'm wondering if there are devices with armeabi ABI (ARMv5) and API level 15+ Can i include only armeabi-v7a and x86 libraries and skip the old armeabi?...

Debug native code in Android Studio

Google I/O 2015 promised debugging native code in Android Studio. To do this, you need to install ndk-bundle through SDK manager and update Android Studio to the latest version (Canary branch). And what to do next? How setup? Here is a link to the source. Source

Project Tango Point Cloud strange crash, and dense depth map

I am trying to use Project Tango C API, but the application crashed with no error if number of point cloud are more than ~6.5k (after some testing) with the following code int width = mImageSource->getDepthImageSize().x; int height = mImageSource->getDepthImageSize().y; double fx = mImageSource->calib.intrinsics_d.projectionParamsSimple.fx; double fy = mImageSource->calib.intrinsics_d.projectionParamsSimple.fy; double cx...

Native Code: cannot use typeid with -fno-rtti

I'm trying to build native code on android because I want to use VTK for my android tablet. However, I am facing some issues when it comes to building one of the vtk examples. I know this problem has been covered here for an objective c issue but I guess...

fpscr register is not updated when enabling floating point exceptions on arm7, SIGFPE not generated

fpscr register is not updated and SIGFPE is not generated. This was tested on an NVidia Shield Tablet and a 1st gen Nexus 7. feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); The implementation calls code, which eventually executes this assembly: asm _volatile__("vmsr fpscr,%0" : :"ri" (fpscr)); ; disassembly follows ldr r3, [r11,...

adb screencap output is different than on the device

I have a graphical glitch related to blending in my OpenGL application using Android NDK. The strange thing is that when I take a screenshot through adb screencap command, the problem completely disappears and the result looks okay. My question is: Is there a way to know what is happening...

Android Studio 1.3 Preview NDK support

Yesterday Google announced that native code debugging is now possible with this version of Android Studio. I've updated to the newest build version "AI-141.1962279" and can't see any possibility of debugging native code. I've switched to build-tools 23.0-rc1, used gradle plugin 1.3.0-beta1 but cannot set breakpoints in native code...

Error for cv::FileStorage in JNI

I am getting errors while compiling my native.cpp file in Eclipse ADT/NDK. While compiling the following lines of code FileStorage storage(nativepath, FileStorage::WRITE); storage << "img" << mat; storage.release(); The errors are D:/androidworkspace/Augmented-Reality//obj/local/arm64-v8a/objs/ndksetup/native.o: In function Java_com_shahrukh_AugmentedReality_CAMShiftDetection_savemat(_JNIEnv*, _jobject*, long long, _jstring*)': D:\androidworkspace\Augmented-Reality/jni/native.cpp:14: undefined reference...

OpenGL framebuffer android without GL_OES_packed_depth_stencil (on Nexus 7 2012)

How do I init the framebuffer with depth and stencil on a device which does not support GL_OES_packed_depth_stencil (In my case a Nexus 7 2012)? This does not work: glGenRenderbuffers(1, &depthStencil); glBindRenderbuffer(GL_RENDERBUFFER, depthStencil); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, width, height); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthStencil); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, depthStencil); GLenum status =...

Android NDK socket creation null pointer

For adding TCP-socket-options, I need to use the C-sockets of Android NDK instead of Java sockets. The following function is called by a button-click-event. When creating such a socket, the syscall leads me to a null pointer (see log output at the end). As the log shows, the line above...

Native method not found: Package.methodName:()Ljava/lang/String;

Good day, I am having trouble on android ndk development. I am very new to ndk and following a tutorial. On compilation time no error comes but when i uploaded the application in device it gives me an error that Native Method Not Found. I have attached the code and...

re write-sql statement Insert OR REPLACE from java to c++ NDK Android

I need re write this sqlite Statements from java to c++, BEcouse of low performance: I red this arcticle: Improve INSERT-per-second performance of SQLite? But Iam totaly confused, becouse I cant find any sqlstatemenst of Insert or Update public synchronized void saveMatchValue(int photoRecOwner, int[] photoRecAssign, float[] value) { SQLiteDatabase database...

Problems compiling NDK project with Android Studio 1.3 preview

Decided to give the new NDK support in Android studio a shot but seem to be running into an issue: Error: 'std::function' has not been declared Had a few other linking issues with stl libraries before but those were fixed by adding stl "stlport_static" cFlags "-O2 --std=c++11 " to the...

Compile and use boost for Android NDK R10e

How do I compile and use Boost for the Android NDK? I've tried everything I've found online, from Boost for Android to compiling it myself with the bjam file. However, I do not succeed. When I try compiling it with bjam, I get the following error: error: toolset gcc initialization:...

Android NDK error bash: ../../build/intermediates/classes/debug/: Is a director

ubuntu kylin system NDK version r10e SDK version android-22 Details command: javah -d jni -classpath /home/king/ide/android-sdk-linux/platforms/android-22/android.jar;../../build/intermediates/classes/debug/ com.lengking.ndk.MainActivity error :bash: ../../build/intermediates/classes/debug/: Is a director I did not find the answer on the Web

Remote debugging of pure C program with GDB

I am trying to remotely debug a pure C program on an Android device. The Android device (target) is connected via USB to a host machine. What I did was: Copied from the target the following files: /system/lib, /vendor/lib, /system/bin/app_process, and /system/bin/linker. Target: Copied gdbserver from NDK to the target...

How to make android NDK work in windows?

I have downloaded android-ndk-r10e & I have also setted path in environment variable as well as NDK path for eclipse. I was able to build and run HelloJni sample app from eclipse, but when I use console to build it says 'ndk' is not recognized as an internal or external...

On Android Studio 1.3, NDK support not working

I have upgraded the Android Studio to 1.3, about which they say they have added Native development support. But I found no change regarding NDK. :/ Any help?

Android ndk example native-audio error

I try to use the example code for OpenSl ES wich is included in NDK in Android Studio. It didn't work as you will see later on. So I need help to use the code in Android Studio. The Code was written for Eclipse but I used the import function...

Getting error: Execution failed for task : myApp:compileDebugNdk'

Hi I am trying to run an app created with Cocos2d-x 2.5 with Android Studio but I keep getting this error when running the project: :myApp:compileDebugNdk AGPBI: {"kind":"ERROR","text":"*** Android NDK: Aborting... . Stop.","sourcePath":"/mypath/ndk/android-ndk-r10d/build/core/","position":{"startLine":199},"original":""} FAILED Execution failed for task ':myApp:compileDebugNdk'. Building works ok. I have Android Studio 1.1.0 and a Mac...

How to fix 'javah' error when using NDK with Android Studio?

I am trying to set up NDK so that I can add C/C++ code to my Android application within Android Studio 0.5.1. I am ultimately trying to get it compiled during gradle build, and to properly handle APKs generation. Much like the tutorial explains in this video: . My...

double* android ndk crash

I'm facing a peculiar problem with the android ndk. I'm trying to read a previously stored set of bytes in an unsigned char* readBytes (previous allocated and read from file). The data needs to be interpreted as double. unsigned char* svDataOffset=(unsigned char*)(readBytes+byteCounter); unsigned char* chars=(unsigned char*)(svDataOffset+2); //offset of 2 is...

Android Studio NDK return jint

I have successfully followed this tutorial to learn about building NDK apps with Android Studio. That tutorial uses a public native String HelloJNI(); That string is set in the HelloJNI.c file #include "com_example_myapplication_MainActivity.h" /* Header for class com_example_myapplication_MainActivity */ /* * Class: com_example_myapplication_MainActivity * Method: HelloJNI * Signature: ()Ljava/lang/String;...

can't include shared library in android studio

I'm having a hard time with including my own sqlite library ( in android studio: I followed this guide and loaded this and compiled it with latest android NDK (r10e) (i just added "APP_ABI := xxx" to the to build also x86 and armeabi-v7a versions of it) and got...

Automatically copy .so files from NDK library project?

Using Android Studio with Gradle 1.2.3. I have an NDK library project A that produces a number of .so files in its own libs folder. Though, I cannot see the reference to this folder anywhere in the build.gradle file. When I reference library A from my app MyApp I...

Using .so files in Android Studio

I am new to Android. I have a basic hello-world native code function like this: #include <string.h> #include <jni.h> #include <cassert> #include <string> #include <iostream> #include <fromhere.h> using namespace std; /* This is a trivial JNI example. * The string returned can be used by java code*/ extern "C"{ JNIEXPORT...

dlopen failed: cannot locate symbol “cblas_sdsdot” referenced by “”

I cross compiled gsl for android using arm-linux-androideabi compiler following the answer provided in this question. I installed the library in /home/username/AndroidGSL. I checked the file command and it gave me symbolic link to `' so i did again for and got this ELF 32-bit LSB shared...

Linking against third-party libraries when doing cross-platform build in Visual Studio 2015

I am trying to compile a Shared Object (.so) with Visual Studio 2015 RC. I am linking against the Opus Codec libs in my stdafx.h: #pragma comment(lib, "..\\..\\opus-1.1-beta\\win32\\VS2010\\Win32\\Debug\\celt.lib") #pragma comment(lib, "..\\..\\opus-1.1-beta\\win32\\VS2010\\Win32\\Debug\\opus.lib") #pragma comment(lib, "..\\..\\opus-1.1-beta\\win32\\VS2010\\Win32\\Debug\\silk_common.lib") #pragma comment(lib, "..\\..\\opus-1.1-beta\\win32\\VS2010\\Win32\\Debug\\silk_fixed.lib") #pragma comment(lib,...

NDK application Signature Check

I have some security key in an application. I want to store it securly. I like to store it in a native shared library (maybe generated from some code). After that I want it to be returned by a method that will check the signature of the original APK. So...