其他分享
首页 > 其他分享> > Android-基础教程-log

Android-基础教程-log

作者:互联网

示例代码

package com.example.learnlog;

import androidx.appcompat.app.AppCompatActivity;

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

public class MainActivity extends AppCompatActivity {

    //logt 快捷键
    private static final String TAG = "MainActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        //logi 快捷键
        Log.i(TAG, "onCreate: test");
    }
}

标签:log,savedInstanceState,快捷键,MainActivity,基础教程,import,Android,onCreate,Log
来源: https://blog.csdn.net/pwp032984/article/details/122838432