These two days, I am crazy about working overtime for the company and catching up on projects. If you are free tonight, I will write a tutorial on printing scalar or needed characters on the android console.
The general printing method of Java is system. Out. println (""); the result is also displayed on the IDE console. However, on the Android platform, system. Out. println (""); you cannot see the printed messages. Because the printing method provided by Android is log. V, this object needs to be imported into import Android. util. log; and then it can be used. The view result is not in the IDE console Panel. In the log panel provided by Android, you can select debug mode in the upper-right corner of IDE to view the log panel.
Below is the test code written for this tutorial
Package com. Google. Android. testlog;
Import Android. App. activity;
Import Android. OS. Bundle;
Import Android. util. log;
/* The copyright of this tutorial is owned by the http://blog.csdn.net/wudifeng blog owner, the code is freely used, If You Want To reprint please indicate the source, this is to write the tutorial people have to respect at least, thank you :)
*/
Public class testlog extends activity {
/** Called when the activity is first created .*/
@ Override
Public void oncreate (bundle icicle ){
Super. oncreate (icicle );
Setcontentview (R. layout. Main );
Log. V ("debug", "message ............");
}
}
NOTE 1: The attachment is a description.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/wudifeng/archive/2009/05/01/4140306.aspx