Like this:
#include <android/log.h>
__android_log_write(ANDROID_LOG_ERROR, "Tag", "Error here");//Or ANDROID_LOG_INFO, ...
Add it to your makefile like this:
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
More Related Contents:
- How to build an executable for Android shell
- define LOCAL_SRC_FILES in ndk{} DSL
- Copy Database from assets folder in unrooted device
- Eclipse compiles successfully but still gives semantic errors
- Android NDK: getting the backtrace
- How to link a prebuilt shared Library to an Android NDK project?
- Want to compile native Android binary I can run in terminal on the phone
- Android OpenGL ES 2.0 emulator
- How to compile C into an executable binary file and run it in Android from Android Shell?
- Any simple way to log in Android NDK code?
- Android ndk std::to_string support
- How to access resource with dynamic name in my case?
- Cross compiling static C hello world for Android using arm-linux-gnueabi-gcc
- Android Fatal signal 11 (SIGSEGV) at 0x636f7d89 (code=1). How can it be tracked down?
- How to access data/data folder in Android device?
- updating Google play services in Emulator
- Failed to allocate memory: 8
- NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN error
- How to Automatically add thousand separators as number is input in EditText
- libjpeg-turbo for android
- CLI on DalvikVM fails on JNI lib
- Gstreamer examples in Android Studio
- Android Studio, Suddenly got GPU Driver Issue when running emulator
- Emulate Samsung Galaxy Tab
- Android Studio emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
- After updating Android Studio to version 1.3.0 I am getting “NDK integration is deprecated in the current plugin” Error
- WebP for Android [closed]
- Disable multi finger touch in my app [duplicate]
- C++ ifstream.getline() significantly slower than Java’s BufferedReader.readLine()?
- Android NDK: No rule to make target