Tag: android-ndk

Add abiFilters to gradle properties

I want to add ndk.abiFilters property in gradle.properties file. Now I’ve this property inside build.gradle. Here is part of my build.gradle buildTypes { debug { ndk { abiFilters “x86”, “armeabi-v7a”, “armeabi” //abiFilters ABI_FILTERS } } } Here’s part of my gradle.properties file ABI_FILTERS = “x86”, “armeabi-v7a”, “armeabi” Problem is that String from gradle.properties is not […]

Cross-compiling Freetype 2.5.3 for Android

I’m trying to cross-compile Freetype 2.5.3, so I could use it with my Android NDK Opengl ES 2 project, but I’m not sure how to do it. I’m using Cygwin on Windows. I already searched and read a lot of stuff about it, but I still need help. I exported some flags in cygwin: $ […]

How to write/debug Android.mk for NDK static library?

I’m trying to build a static library using the latest Android NDK (r5) and I’m not having any luck. I’ve been able to build and run the samples (for example, HelloJni) without any issues but starting a new project from ‘scratch’ has been a different story. For this experiment, I’m trying to build libpng. My […]

ndk-gdb with multiple so libs

I learned about the debug tool of “ndk-gdb” from Android NDK r4. Now I can start debugging the hello-jni sample(although some issue exists). But, for my own Android applications, I have several so libs to use, build from a large number of c/c++ files. I used to build these so files with ndk-build, and then […]

Does Android really exist on other platforms than ARM?

I want to port an aplication written in C++ to android. Converting the application from C++ to Java will take a lot of work that I would prefer to use on making the application better for that platform instead of fixing convertion bugs and solving refactoring problems. The NDK seems a good route to take […]

UnsatisfiedLinkError In Android 4.4 libDevil cannot locate symbol “png_set_longjmp_fn”

I have an image converter app on google play that runs fine and well, it incorporates NDK for support of more file formats using the DevIL Image Processing library. It wokrs fine on most devices but since Android 4.4 Kitkat came out, i’ve received emails and crash reports on Google Play Console especially from Nexus […]

how to include prebuilt shared libraries in apk with eclipse

I have a shared library libfoo.so and need to use it in my android app. My first try was to have in Android.mk: include $(CLEAR_VARS) LOCAL_MODULE := test LOCAL_SRC_FILES := test.cpp LOCAL_LDLIBS := -L$(PATH_TO_FOO) -lfoo include $(BUILD_SHARED_LIBRARY) in my activity, I have: statis { System.loadLibrary(“foo”); } This builds correctly, however I noticed that created apk […]

How to unzip large zip file & write to SDCARD in less time

To unzip zip file I’ve used classes from package java.util.zip* by refering this and it works correctly however to unzip a file of 40MB it takes 59 seconds. When I tried same zip file on iPhone project (we are developing app for both platforms – Android & iPone & that have functionality to unzip zip […]

How to avoid stripping for native code symbols for android app

I’m getting sigsegv 11 in native code and i need to avoid stripping to understand what’s wrong. The app uses library (aar) and i was able to avoid stripping for the aar with ‘cmd-strip’ hack. But in the apk stripped version of .so is used anyway so the app strips the symbols, probably while transformNative_libsWithStripDebugSymbolForDebug […]

Invalid indirect reference on NewObject call

OK, so I have the native code below. I’m trying to return an array of FilePermissionInfo from it, populated with some data returned by stat(). The problem is that I get the following error when NewObject is called the first time: 06-15 20:25:17.621: W/dalvikvm(2287): Invalid indirect reference 0x40005820 in decodeIndirectRef 06-15 20:25:17.621: E/dalvikvm(2287): VM aborting […]

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