We often encounter such a situation, because the log too much, so that our logcat is always automatically emptied, what should be done? The error message is not visible.
In fact, we use the ADB shell to solve this problem.
1. Configure Environment variables
The configuration of environment variables is not necessary, but in order to use the command is convenient, we'd better configure it, the specific operation is not said, said two points:
1. New Android_sdk_home, value for your SDK directory, mine is D:\Program\android\SDKForEclipse
2. Add in Path;%android_sdk_home%\tools;%android_sdk_home%\platform-tools, but pay attention to the former;
2. Using the ADB log command
When our Logcat clears so fast that we cannot see the error message, we can print the log using the following method:
1. Open cmd, enter the following command and return:
Note that the D:\aaa.txt behind,> means that we print the logs to the Aaa.txt file in the D drive.
2. Open our app to operate, when you are done, press CTRL + C, stop the execution of the command, then open the D drive, you will see the log files exist in the Aaa.txt file.
3. Open Aaa.txt and search for fatal to quickly find the error message.
How does Eclipse's Logcat always automatically empty?