Suddenly report an error. After careful examination of the code, I found that I forgot the first sentence
public static final String TAG="MainActivity";
In general, when developing a program, you will add a log in the method you write or in the position you are not sure about, so that you can accurately find the error point when running the program,
The general format is log. V (tag, “the name you want to remark”);
Log. E or log. V or log. D or log. I
The main activity is the file name
Read More:
- ReflectionUtils can not access XXX “private final”
- XML tag has empty body less… (Ctrl+F1) Reports empty tag body. The validation works in XML / JSP
- Command “python setup.py egg_info” failed with error code 1 in /private/var/folders/14/4hz051qx0wqd3
- Error in the project tag in the POM file of Maven project: failure to transfer
- Solve the problem that the value in the disabled tag cannot be passed to the server
- Curl returns empty reply from server. Due to the processing of special characters, curl cannot be accessed and the browser can access it.
- IOS — solving the problem of reading from private effective user settings
- ERROR: ../tSafe/coreReadArchive.cpp (38) – Serialization Error in verifyHeader: 0 (Version tag does
- XML file should have root tag (extra content at the end of the document in file error)
- OTS parsing error: invalid version tag
- Beautiful soup4 gets the value of the class property of the tag
- Error response from daemon for private harbor login
- ‘ascii‘ codec can‘t decode byte 0x90 in position 614: ordinal not in range(128)
- [Solved] CAP_IMAGES: can‘t find starting number (in the name of file)
- IMG tag onerror event resolves infinite loop error reporting
- remote: error: GH007: Your push would publish a private email address.
- Access restriction in Eclipse: the type ‘xxx’ is not API solution
- ER_ACCESS_DENIED_ERROR: Access denied for user ‘root‘@‘localhost‘ (using password: NO)
- LaTeX Error: Can be used only in preamble