Tag: android-ndk

Can't run a Java Android program with Valgrind

I’m trying to start a Java program under Valgring like this (in adb shell): valgrind am start -a android.intent.action.MAIN -n com.me.myapp/.MainActivity I’m getting: ==2362== Memcheck, a memory error detector ==2362== Copyright (C) 2002-2012, and GNU GPL’d, by Julian Seward et al. ==2362== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==2362== Command: am […]

Error: Program “/ndk-build.cmd” is not found in PATH

I am stuck with this following problem on Mac OS X(10.8.4) and eclipse JUNO since 10 days and I haven’t found anything working on web. I have downloaded and unzipped the android NDK. After that, I have set the NDK location in ‘Android’ option in preferences menu. I want to run a sample opencv code(https://www.dropbox.com/s/6s3qwkon9v67u5z/tutorial-3-native.rar) […]

Android Crashlytics ndk; values of NdkOut and NdkLibsOut in build.gradle

I have integrated Crashlytics, Fabric into my app, the sdk related crashes are reported successfully. For the ndk part, i have followed instructions from the blog; The Wait is Over: Launching Crashlytics for Android NDK, but the ndk crashes aren’t being reported. My doubt is, because other parts are sufficiently clear, i’m not providing the […]

Fixing Eclipse errors when using Android NDK and std::vector

I’m using eclipse to develop an android app that also uses the ndk. I vectors in my app and I’ve done the necessary stuff to get them by including APP_STL := stlport_static In my Application.mk Everything is working fine it compiles and runs but Eclipse keeps giving me errors when I use the vectors std::vector<int> […]

Why is gcc emmiting code aligned to a 2 byte boundary for the ARM instruction set?

I’m inspecting the assembly language output of a C program I’m compiling for the ARM Android platform using GCC (the version included in the Android NDK). I’m specifying the ARM instruction set which are 4 bytes in length rather than THUMB, but surprisingly, the emmited assembly language code is aligning functions to a 2 byte […]

Casting a C++ long type to a JNI jlong

I am using JNI to pass data between C++ and Java. I need to pass a ‘long’ type, and am doing so using something like: long myLongVal = 100; jlong val = (jlong)myLongVal; CallStaticVoidMethod(myClass, “(J)V”, (jvalue*)val); However in Java, when the ‘long’ parameter is retrieved, it gets retrieved as some very large negative number. What […]

Android NativeActivity

The Android NDK has just been significantly expanded to include support for writing android applications entirely in native C/C++ code. One can now capture input events on the keyboard and touch screen using native code, and also implement the application lifecycle in C/C++ using the new NativeActivity class. Given all the expanded native capabilities, would […]

NDK vs JAVA performance

Is any body have a assumption how fast will be C code with NDK with the same calculations then java code?(if any) lets say I am doing X calculations(the same calculations) in Y seconds in java code. How many X calculations can i do in the same Y seconds through the C code in NDK? […]

Using Make's 'wildcard' function in Android.mk

I’m having a problem using Make’s wildcard function in my Android.mk build file. My other makefiles use a line like this one to specify “All .c files in this folder”: CFILES := $(wildcard *.c) In my Android.mk file I tried this: LOCAL_SRC_FILES := $(wildcard *.c) However, this has the same affect as not including any […]

java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared: findLibrary returned null (tess-two)

I am using sqlcipher.jar for encrypting database in android and also using it’s native library in libs/armeabi folder 1)libdatabase_sqlcipher.so 2)libsqlcipher_android.so 3)libstlport_shared.so and libs/x86 folder 1)libdatabase_sqlcipher.so 2)libsqlcipher_android.so 3)libstlport_shared.so and jar file named sqlcipher.jar in libs/ folder all i have imported now every thing is working fine it’s going good database is fetching and reading from sqlite […]

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