LOCAL_LDLIBS += -llog -ldl
ログ出力側の Native コードは、以下の用に記述する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// == ここからインクルード | |
#include <android/log.h> | |
#define LOG_TAG "AndroidClient/nativelogic" ← ログのタグをつける。ファイルやクラスで分けてつけると良い | |
#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) | |
// == ここまでインクルード | |
// == ログ出力の記述 | |
LOGD("output log !"); |
0 件のコメント:
コメントを投稿