Questions tagged [android-ndk]

The Android Native Development Kit (NDK) is a companion tool to the Android SDK that lets build performance-critical portions of apps in native code or port existing libraries in C/C++ to Android. It provides headers and libraries that allows to build activities, handle user input, use hardware sensors, access application resources, and more, when programming in C/C++.

Android NDK applications that include Java code and resource files and and/or source code (and sometimes code). All native code is compiled into a dynamic linked library (.so file) and then called by Java in the main program using a mechanism:

Android NDK Application

The NDK is a powerful tool for developing Android applications because it:

  • Builds performance-critical portions of your applications in native code. When using Java code, the Java-based source code needs to be interpreted into machine language using a virtual machine. In contrast, the native code is compiled and optimized into binary directly before execution. With proper use of native code, you can build high performance code in your application, such as hardware video encoding and decoding, graphics processing, and arithmetical operation.
  • Reuses legacy native code. C/C++ codes can be compiled into a dynamic library that can be called by Java code with a JNI mechanism.

More information:

Latest Version: NDK Downloads

Version History: NDK Archives

Resources:

FAQ:

Books:

13539 questions
6
votes
2 answers

android-ndk, glGenVertexArraysOES not found

I want to use VAO in my native-c application for Android. The problem is, that GL_OES_vertex_array_object is supported and I can even get the addresses of glBindVertexArrayOES and glDeleteVertexArraysOES but glGenVertexArraysOES is not found. Does…
Sergei Ivanov
  • 103
  • 1
  • 9
6
votes
1 answer

Any chances to reduce shutter time with android NDK camera access?

I wrote an android application that captures a live preview from the camera. It is important to have a short shutter time, which should at least be constant. Currently I use the following code to achieve a low shutter time: Parameters params =…
SDwarfs
  • 3,189
  • 5
  • 31
  • 53
6
votes
1 answer

Playback of opus-codec on Android

I'm looking for a way to integrate opus-codec (the decoder part) with my Android application. Do you know of any implementations that have done so? We are currently using ogg-vorbis for spoken prompts, considering going with either speex…
qdot
  • 6,195
  • 5
  • 44
  • 95
6
votes
1 answer

How to prevent Android native project full rebuild after changing Android.mk?

I'm editing Android.mk of my project to fine-tune some compiler options. Every time the build process is started from scratch. I don't want to do a full rebuild after each and every change. Is there a way to do so?
Sergey K.
  • 24,894
  • 13
  • 106
  • 174
6
votes
1 answer

Free Pascal for Android on MIPS

Trying to port a Delphi library to Android. Free Pascal has Android/ARM support - a prebuilt compiler for Windows is available. However, Android NDK now supports MIPS and x86 as well. What's the status of support for those in FPC? For now, my…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
6
votes
3 answers

Android ndk 8b Cannot load library

Upgrading to ndk 8b I receiving some crash report (most of them are Galaxy SII with Android 4.03) java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1286]: 1836 cannot locate '__gnu_thumb1_case_uqi'... at…
Giuseppe
  • 2,093
  • 1
  • 21
  • 26
6
votes
5 answers

error in integration of mupdf library

I am working on a project in which i have to deal with pdf view. I am trying to integrate mupdf library in my project but getting error as mentioned below. I have followed all steps mentioned in readme document. please help me to solve this…
Maulik.J
  • 636
  • 1
  • 6
  • 14
6
votes
2 answers

Using vanilla GCC (or Clang) with android NDK

Android-NDK ships its own compiler to build the native code. The version shipped with my current android-NDK installation is arm-linux-androideabi-g++ (GCC) 4.6.x-google 20120106 (prerelease), I guess it's a fork of GCC 4.6. What are the differences…
peoro
  • 25,562
  • 20
  • 98
  • 150
6
votes
1 answer

OpenVPN and Android NDK

I have a custom made C (cross-platform) application. An OpenVPN variant. I want to compille this for the Android version with NDK. It compiles under Linux. Does this mean i can easily compile it for Andoird too with the NDK? And if so, how can i…
Vivendi
  • 20,047
  • 25
  • 121
  • 196
6
votes
2 answers

Android: Cannot load library (94 missing essential tables)

I'm developing an Android application that uses a huge native library. Some customers are complaining about a crash at startup, one of them gave us his logcat dump: 07-19 10:55:15.139 E/AndroidRuntime(16539)FATAL EXCEPTION: AsyncTask #3 07-19…
spacifici
  • 2,186
  • 2
  • 16
  • 28
6
votes
1 answer

Building Pango Cairo for Android NDK

I found someone who ported over Pango Cairo for Android NDK (blog post, source code). However I have not been succesfull in compiling his example project. Has anyone managed to do so and can tell me what I am doing wrong? This is what I have tried…
Michoel
  • 230
  • 2
  • 7
6
votes
2 answers

Use C with Android ndk

I am trying to develop a Android project that makes a simple call from Java code to native C code. I refer this link for my guidance: http://mobile.tutsplus.com/tutorials/android/ndk-tutorial/ when I am compiling the native.c using …
TamiL
  • 2,706
  • 4
  • 24
  • 44
6
votes
3 answers

How to use c++0x thread in Android NDK?

I am trying to compile this simple program with android-ndk-r8b: jni/hello_jni.cpp #include #include void hello() { std::cout << "Hi i'm a thread!!!" << std::endl; } int main() { std::thread th(hello); th.join(); …
m-ric
  • 5,621
  • 7
  • 38
  • 51
6
votes
2 answers

calling the Android soft keyboard from a C++ file

I am facing some issues in calling the Android soft keyboard from a C++ file. I have a project in C++ and I need to show and use the native soft keyboard in some screens. I am compiling all the code with NDK. Can anybody provide a suggestion on how…
Maidul
  • 1,289
  • 16
  • 30
6
votes
2 answers

Compile NDK code using gnu libstdc++

I want to compile my NDK code using gnu libstdc++, any clue how to do this?
Sreekanth Karumanaghat
  • 3,383
  • 6
  • 44
  • 72