Method Not Found Confusion
I have wrote a base class for building colored strings - ColorStringBuilder
In which I defined ColorStringBuilder::append(String text), which calls for StringBuilder::append().
After building the project for quite a bit, I realized I wanted to expand this method to: ColorStringBuilder::append(Object object), therefore I deleted the original ColorStringBuilder::append(String text). The app compiles fine but somehow all the other classes are still trying to get to ColorStringBuilder::append(String text), which throws errors.
Similiarly I previously defined method ColorStringBuilder::string(String text) for ease of use.
After building the project for quite a bit, I realized I wanted to expand this method to: ColorStringBuilder::string(String text, Object... args) then use String.format() to map objects to text. I then deleted the original ColorStringBuilder::string(String text) and same situation emerges.
Please could someone explain why, many thanks in advance.
请先登录再写评论。
Please share a sample project to reproduce the issue: https://uploads.jetbrains.com.
Unable to reproduce the same error with sample code, I believe this might be a project issue and rebuilding the project should fix this, but after tried rebuilding the same error still occurs. I am yet to find out how this can be solved.
What IDE/version/language do you use? What's the build system? It's not clear from your post.
Sorry about the confusion. Intellij IDEA 2019.2.4, Java 13
Using Maven 3, building jar files.
Please try the current IDE release: https://www.jetbrains.com/idea/download/index.html.
If the issue persists, we'll need a reproducible test case.
Make sure Maven build works without errors in the system command line.
Thank you very much, this has solved the problem, really saved my day.
Not sure if it was due to the reinstalling or the version change.