IDEA error Cannot resolve method 'xxx' in 'xxx'

Today, when I was doing a small project with Logback, this bug appeared, and I reported 50 errors at once, as shown in the figure below. After about 10 minutes of investigation, I searched for solutions on the Internet. The solutions on the Internet are almost the same. There are the following three types.
1. Reinstall Logback
2. Clear the IDE cache
3. Re-import the package and library (maybe a package or library with the same name)
insert image description here

The above three methods are useless. Finally, check the syntax errors one by one. At the end of the investigation, it is found that in the updateMovie() method, one method bracket is missing. (laughing and crying)

The code logic of addMovie() is as follows:
insert image description here

Part of the code logic in the updateMovie() method comes from the addMovie() CV. During the CV, it was found that a curly brace was pasted, causing the IDE to report more than 50 errors. (Laughing and crying)
Because a parenthesis was missed, all the methods written later were not recognized by the IDE.

The last time I made such a low-level mistake, when I was a sophomore, I typed the comma of a certain SQL statement into a Chinese comma in JDBC, and it took me an hour to sort out the error (I can’t laugh or cry)

If this kind of error occurs again, first check for grammatical problems, whether curly braces, brackets, etc. are missing, and then check for other problems.

Guess you like

Origin blog.csdn.net/qq_42242452/article/details/129704282