当前位置:操作系统 > 安卓/Android >>

android学习笔记4-------日志打印

import android.app.Activity; 
import android.os.Bundle; 
import android.util.Log; 
 
public class LogActivity extends Activity 

    private static final String TAG="LogActivity"; 
 
    @Override 
    public void onCreate(Bundle savedInstanceState) 
    { 
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.main); 
        Log.i(TAG, "TAG打印测试"); 
    } 

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class LogActivity extends Activity
{
 private static final String TAG="LogActivity";

 @Override
 public void onCreate(Bundle savedInstanceState)
 {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  Log.i(TAG, "TAG打印测试");
 }
}\

 摘自 奔跑的蜗牛



补充:移动开发 , Android ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,