To write log messages from your application:
- Import
android.util.Log
. - Use
Log.v()
,Log.d()
,Log.i()
,Log.w()
, orLog.e()
to log messages.
E.g.,Log.e(this.toString(), "error: " + err.toString())
- Launch DDMS from a terminal by executing
ddms
in your Android SDK/tools
path. - Run your application in the Android emulator.
- From the DDMS application, select the emulator (e.g., "emulator-5554") and click Device > Run logcat... to view all the log data.
No comments:
Post a Comment