preface
First of all, there is no problem with the operation of the program and every step of the application is not affected. However, When loading the XML layout, AndroidStudio always prompts that the XML file has not been changed. However, I have clearly created the XML file because I directly click to create it, which is impossible I intentionally created the XML layout by hand again, but when I clicked ok, I was told that the XML file already existed!
Problem description
This project contains Java compilation errors, which can cause rendering failures for custom views. This project contains Java compilation errors that may cause custom view rendering to fail. Fix the compilation problem first.
I was puzzled and saw a red * when I opened the XML to find the root of the problem!* Exclamation point hint!
As shown in the figure:
Okay, so that’s it
The solution
Text explain It is the reason why you use third party control Whether the View or Adapter I use recyclerView third-party universal Adapter BaseRecyclerViewAdapterHelper open found their own projects Build. Gradle: build. Gradle: build. Gradle: build. Gradle: build. Gradle: build. ~
Solution 1.
The answer from
StackOverflow
Solution 2.
Go to File - > Invalidate Caches/Restart to clear the cache and Restart Studio
Click Invalidate Caches/Restart to clear the cache and Restart Studio
conclusion
So someone asked me about a project that relies on dozens of third-party libraries and HOW do I know which one is the problem?
May I ask what your original problem was?
This reminds me of a line from a movie I’ve seen
It’s a movie starring Guo Da Statham. If you’re interested, you can watch it. It’s fun!