java – Log. D log is not displayed in logcat Android studio d
•
Java
Android studio does not display any logs I wrote in the code I have tried to set the log to verbose and debug I'm using 'no filter' Why doesn't 'oncreatetestlog' appear in my logcat?
package com.example.keydown; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (savedInstanceState != null) { Log.d("Oncreatetestlog","onCreate() Restoring prevIoUs state"); /* restore state */ } else { Log.d("Oncreatetestlog2","onCreate() No saved state available"); /* initialize app */ } } }
Solution
Go to file – > invalidate / restart cache And let Android studio index your project again This is useful to me
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码