Tried several solutions, hereby record:
- Restart Android Studio (can solve most inexplicable reasons);
- Build => Clear Project => Rebulid Project ;
- File => Sync Project with Gradle Files;
- The version of the referenced public class library does not match the version of the SDK. Solution ①: Gradle Scripts => build.gradle (name of the referenced public class library), change the Version to be consistent with the SDK, as shown in the figure below: ②Download is consistent with the version of the public class
library the SDK.
In the afterword, the problems I encountered were solved using ② of solution 4.