Skip to content

Instantly share code, notes, and snippets.

@myamamic
Created December 12, 2012 08:16
Show Gist options
  • Select an option

  • Save myamamic/4266010 to your computer and use it in GitHub Desktop.

Select an option

Save myamamic/4266010 to your computer and use it in GitHub Desktop.
[Android][C/C++] nativeコードでlogcatでログ出力
1. Android.mkにライブラリ (liblog)追加
LOCAL_SHARED_LIBRARIES := \
liblog \
2. 使いたいソースファイルで適当にdefineする
#include "android/log.h"
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, "TAG", __VA_ARGS__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment