You can use the Android logging facilities:
#include <android/log.h>
#define APPNAME "MyApp"
__android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "The value of 1 + 1 is %d", 1+1);
Make sure you also link against the logging library, in your Android.mk file:
LOCAL_LDLIBS := -llog
More Related Contents:
- How to use JNI bitmap operations for helping to avoid OOM when using large images? [closed]
- How to build an executable for Android shell
- define LOCAL_SRC_FILES in ndk{} DSL
- Calling a java method from c++ in Android
- Eclipse compiles successfully but still gives semantic errors
- What is the best way to save JNIEnv*
- How can I catch SIGSEGV (segmentation fault) and get a stack trace under JNI on Android?
- Android NDK: getting the backtrace
- How to link a prebuilt shared Library to an Android NDK project?
- Calling native method twice of third party library in an Activity causes the Android application to close down
- CLI on DalvikVM fails on JNI lib
- Want to compile native Android binary I can run in terminal on the phone
- Write file to location other than SDcard using Android NDK?
- FindClass from any thread in Android JNI
- Rotating a bitmap using JNI & NDK
- How to compile C into an executable binary file and run it in Android from Android Shell?
- NDK – How to use a generated .so library in another project
- Android ndk std::to_string support
- How to Find memory leaks from native code in android
- Debugging Android NDK C/C++ code in Eclipse – breakpoints are not hit
- What is the Log API to call from an Android JNI program?
- Why do some Android phones cause our app to throw an java.lang.UnsatisfiedLinkError?
- Cross compiling static C hello world for Android using arm-linux-gnueabi-gcc
- A correct way to convert byte[] in java to unsigned char* in C++, and vice versa?
- Android JNI – Call AttachCurrentThread without DetachCurrentThread
- Javah Error android.app.Activity not found
- C++ ifstream.getline() significantly slower than Java’s BufferedReader.readLine()?
- WARNING: ABIs [armeabi-v7a,armeabi] set by ‘android.injected.build.abi’ gradle flag contained ‘ARMEABI’ not targeted by this project
- Android OpenGL ES 2.0 emulator
- Official “Boost library” Support for Android and iOS? [closed]