Actually, this error message clearly explains the solution by itself. It says you need to select an area on a layer that has some pixels on it. But sometimes we encounter with this problem, when there are no selections on any layers.
The solution is again simple; firstly, we need to check if there is a selected area or not by clicking View > Extras (or just hit Ctrl+H). Probably, the selected area is there and it really has no item in it. At last, deselecting (press Ctrl+D) simply solves the nudging problem.