I do not believe that this is the problem that the poster had, but for others I will add what I found when I was helping someone in Windows XP who was getting the same error.
It seems that in his case, the problem was that there were gaps in the path to the Android Studio project (since the Windows Documents and Settings directory is used in Windows XP). I made him create a new project in the catalog without spaces in it, and he built and ran without problems. Perhaps there was actually something else, but as usual, it is better to avoid spaces in the tracks.
user486646
source share