After releasing the Android package, it is difficult to know what is happening, such as the flash back and so on, can be detected with Logcat,Logcat is a command line tool in Android, can be used to get the log information of the program , you can use the Logcat command to view the contents of the system log buffer.
It is also possible to run an Android program or a real machine with the simulator to test it .
Its position is in the sdk/platform-tools.
Instruction format
[ADB] logcat [<option>] ... [<filter-spec>] ...
Option section
V-verbose (Lowest priority)
D-debug
I-info
W-warning
E-error
F-fatal
S-silent (highest priority, on which nothing is ever printed)
| Option |
Description |
| -b<buffer> |
Load a log buffer that can be used for viewing, such as event and radio. The default value is main. See viewing alternative Log buffersspecifically. |
| -C |
Clear the Log on the screen. |
| -D |
Output the log to the screen. |
| -f<filename> |
Specifies the <filename> of the output log information, which is stdout by default. |
| -G |
Outputs the specified log buffer and exits after output. |
| -N <count> |
Set the maximum number of logs <count>., the default value is 4 and needs to be used with the-r option. |
| -R <kbytes> |
Output log per <kbytes>, default value is 16 and needs to be used with the-f option. |
| -S |
Set the default filter level to silent. |
| -V <format> |
Set the log input format, the default is brief format,
To learn more about the supported formats, see controlling Log Output format. |
We can use CMD CD to this folder, in the input command adb logcat to see the log information in cmd in real time
adb logcat - S Unity only View unity information
adb logcat-d > Xxx.txt Output The previous log information to TXT
The same as adb logcat- s Unity -d > Xxx.txt to output the previous Unity log information to txt
Successfully found the problem
For more detailed information, refer to: http://www.miui.com/article-272-1.html
Xiaomi Real Machine Catch log method: Http://www.miui.com/thread-397214-1-1.html
by wolf96 2017/7/13
Unity3d using Logcat to debug Android