Tag: android-ndk

How to configure NDK project in Android Studio 1.3

I have been trying to configure Android Studio for NDk by following this article and this article. The following are the contents of my gradle-wrapper.properties #Sat Aug 08 09:36:53 IST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip Following is the contents of build.gradle(project) // Top-level build file where you can add configuration options common to all […]

How to incorporate existing make file with Android NDK

So I have a huge existing C project that I have placed in $PROJECT/jni directory. This project is normally made by running a configure script which creates the Makefiles which then allows the project to be compiled via make. This project is rather large and has many directories containing source files and header files. I […]

“Unknown Application ABI:” while 'debug as native application'

I’v got such problem: [2013-11-18 14:38:50 – HelloJni] Unknown Application ABI: [2013-11-18 14:38:50 – HelloJni] [2013-11-18 14:38:50 – HelloJni] Unable to detect application ABI’s This problem occures on every project, which I am trying to debug ‘as native’. I have seen this, this and this topics, but this solutions have not brought any effect in […]

Creating an android.graphics.Bitmap from C++

I have some NDK based C++ code that needs to build an android bitmap object. I’m sure there is a way to do this directly from the C++ code but its not the easiest of things to do 😉 So the method I want to call is Bitmap.createBitmap( width, height, Bitmap.Config.ARGB_8888 ); So to do […]

Android JNI – Call AttachCurrentThread without DetachCurrentThread

I have been reading about JNI stuff and can’t seem to figure out what happens if a thread starts -> calls AttachCurrentThread() -> make some JNI calls -> thread exit. Ideally, we should call DetachCurrentThread() before thread exits, however, what are the implications if the app doesn’t do that? Would it cause memory leak or […]

How to make Android device boot when power is plugged in?

I need to use this for a Samsung Tablet. Usually if the device is switched-off and the USB cable is being connected the display will wake up for some seconds showing an animated battery. Instead I want to let it boot. I suspect this is close to the metal. Where do I have to make […]

Android NDK, No rule to make target

I’ve seen this question other places, but the answers don’t seem to apply to my situation. I’ve got a .cpp file (not a .c file). I’m getting the error: make: * No rule to make target jni/native.c’, needed byobj/local/armeabi/objs/native/native.o’. Stop. Cirapi_android C/C++ Problem Here’s my Android.mk file (very simple): LOCAL_PATH:=$(call my-dir) include $(CLEAR_VARS) LOCAL_LDLIBS:=-llog LOCAL_MODULE:=native […]

What is the best method to render video frames?

what is the best choice for rendering video frames obtained from a decoder bundled into my app (FFmpeg, etc..) ? I would naturally tend to choose OpenGL as mentioned in Android Video Player Using NDK, OpenGL ES, and FFmpeg. But in OpenGL in Android for video display, a comment notes that OpenGL isn’t the best […]

android ndk UnsatisfiedLinkError when using a prebuilt shared library

I’m trying to create a shared library that links to another shared library. Here is my main module Android.mk: TOP_LOCAL_PATH := $(call my-dir) include $(call all-subdir-makefiles) LOCAL_PATH := $(TOP_LOCAL_PATH) include $(CLEAR_VARS) LOCAL_CPP_EXTENSION := cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/ $(LOCAL_PATH)/lib/include LOCAL_MODULE := SightCore-jni LOCAL_SRC_FILES := SightDemo.cpp SightCore-jni.cpp LOCAL_SHARED_LIBRARIES := SightAPI LOCAL_LDLIBS = -llog include $(BUILD_SHARED_LIBRARY) I also […]

armeabi and armeabi-v7a folder

I’m working on an Android project and I am using the NDK to call native methods. I have two libraries (.so files) and one is located in the libs/armeabi folder and the other one is located in the libs/armeabi-v7a lib folder. If I try to run the application then it won’t load the library in […]

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