I was having the same problem while working thru a tutorial on LinkedIn Learning. Ultimately, I found that if I used a non-fractional number for both the "x" and "y" coordinates as in:
textObject.setPosition((int)xPos, (int)yPos)
...it would work. Is there anything inherently wrong with doing this? In my case it was only for the "Score =" line, so it didn't really need to move or animate, per se. The reason I had a fractional number in the first place, is because I implemented some code to "scale" the text and position of the text based on the size of the game window.
Chris