Tag: android-ndk

How to call a function in CPP file from C File and vice versa in ANDROID NDK?

I am not able to call a function in cpp file from c file and also a function in c file from a cpp file in the ndk itself. I tried using extern “C” {} as well. Pasting the code i tried here for reference. CFileCallingCpp.c: #include “CFileCallingCpp.h” //#include “custom_debug.h” #include “CppFile.h” void tempFunc() { […]

Unable to debug with gdb under Android and NDK, starting Gdb crashes App

I’m having problems trying to debug native code with the Android NDK. While the App is running I launch ndk-gdb, and the result is that gdb loses the connection with the device and the app on the device crashes. The very same thing happens with both the Device (Samsung Galaxy 10.1) and the emulator. The […]

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 java.lang.Runtime.loadLibrary(Runtime.java:370) at java.lang.System.loadLibrary(System.java:535) at com.iuculano.fplayer.SDLActivity.void onCreate(android.os.Bundle)(SourceFile:324) at android.app.Activity.performCreate(Activity.java:4465) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1932) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993) at android.app.ActivityThread.access$600(ActivityThread.java:127) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4507) at java.lang.reflect.Method.invokeNative(Native Method) […]

Integration or build instructions for libjpeg-turbo on Android

Various pages can be found on the internet mentioning libjpeg-turbo for Android (example). They all point at the repository here, and say to read ANDROID.txt for build instructions. There’s no such text file in the repository though. Is this repository the official place to go to get libjpeg-turbo for Android? If so, where are the […]

android ndk no rule to make target

I realise this question has been asked before but no answers have been able to solve my problem. I’m trying to build a sample android app provided with NDK which has the following Android.mk file: LOCAL_PATH := $(call my-dir) MY_PATH := $(LOCAL_PATH) include $(call all-subdir-makefiles) include $(CLEAR_VARS) LOCAL_PATH := $(MY_PATH) LOCAL_MODULE := native-activity LOCAL_SRC_FILES := […]

How to point OpenSSL to the root certificates on an Android device?

I’ve managed to cross-compile OpenSSL for ARMv6 for use with the Android NDK and get it to run within my application. However, when attempting to establish an HTTPS connection to a well-known host (such as https://google.com), I always receive the error “The SSL certificate is invalid.” However, I have no difficulty displaying secure pages within […]

C++11 std::async in Android NDK does not work

I have tried to get following sample code working to know whether asynchronous programming is working in Android NDK. Though NDK has the STL <future> which gets recognized as a header, the std::async is not getting recognized are not getting recognized. The code I tried to use was the following: #include <future> #include <iostream> struct […]

How to catch UnsatisifiedLinkError when using NDK-built library in an Android app?

I have an Android project that contains a class that uses JNI to pull a value from a C function. The C function was built into a library using NDK. The value returned from the C function is in turn used to initialize a variable inside a class when its first loaded. This works fine. […]

How to compile ffmpeg-2.2.2 on windows with cygwin and android ndk r9c

did someone successfully compile ffmpeg-2.2.2 on windows with cygwin and android ndkr9c ? Or can point me to an up to date tutorial ? (http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/ isn’t working for me i get Makefile:2: config.mak: No such file… cygwin admin devel gnome is completely installed and make -v ok ) I need to convert a video to […]

ANDROID NDK – android: command not found

I was trying to go through the first sample exercise provided in Android NDK. I was trying to run the following command on cygwin android update project –p However, I am getting android: command not found error. I checked my PATH variables. It already had ANDROID_HOME , ANDROID_HOME/platforms, ANDROID_HOME/tools, ANDROID_HOME/platform-tools One thing that I noticed […]

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