Java, the output of Android information

Source: Internet
Author: User

Output of implementing information in Android

Java General printing method for System.out.println (""); J2ME Also, you can see the effect in the IDE's console.

But Android platform, System.out.println (""); you can't see the printed message. Because Android provides a way to print, LOG.V, the object needs to be imported into import android.util.Log, and then it can be used. Look at the effect, not in the IDE's console panel, but in the log panel provided by Android, you can select debug mode in the upper right corner of the 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;

/**

* Test information output;

*/

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 ......"); Output information;

}

}

Java, the output of Android information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.