You can implement your own Dependency Injection system (or in this case, Service Locator system), but should you?
Like everything else, one needs to trade the time and effort involved in building—and debugging and maintaining — your own system vs. using an off-the-shelf component that’s in use and tested by hundreds (if not thousands) of other developers and used in many existing application.
Further, off-the-shelf solutions like Resolver offer additional features and support that DIY’ers might find tricky and/or time-consuming to implement on their own (shared dependencies, graph resolution, named instances).
They may also internally implement mechanisms like thread-safety whose lack in a project can serve to trip up the unwary and may lead to difficult, intermittent, hard-to-find bugs. Especially when the implementer never even considered the need for such things in the first place.
Good solutions also have unit tests that enable you to be confident that the code does what it’s supposed to be doing, and include documentation that makes it much easier to onboard other developers to the project.
My advice would be to focus on application features and the things that make your app unique, and perhaps focus less on reinventing the wheel. Especially when time spent reimplementing every wheel is time not spent on your application.