Considering that you have everything (re)installed correctly and that a newer project works without problems you might expect that the problem is project related. What remains is to rebuild the project in steps.
The first question is whether you are able to resolve the error message:
(be aware that error messages usually do not provide clarification of the exact cause) to replicate by starting with the minimum requirements to make this function work. If compiling that works without error, you will have to add a piece of functionality from your old program each time, compile it, and continue doing so until the error occurs again.
Based on your observation that a new program works without problems, I also do not rule out that (because you have not updated your program for a long time) Google has changed the way in which you have to offer something. Based on the short cryptic error message, it seems that the compiler may stumble over a modified underlying library(s). Take a critical look at how you will use the function nowadays (is everything still correct, start completely over because sometimes something disappears, or it just becomes a little different).
As always, without an example it is difficult to pinpoint a cause.