When I try to build Android platform, I was getting the below error and when I searched for fix found this solution and tried the same by downloading different build tools but it didn't worked out and later after two days it worked normally (not sure how it was) and I was able to execute the build and again in sometime I am getting the same error.
Using PhoneGap 3.3.0
>phonegap build android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] compiling Android...
[error] An error occurred while building the android project.Error executing "ant debug -f "C:\dev\phonegap\web-service\platforms\android\build.xml"": BUILD FAILED
C:\dev\tools\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:892: The following error occurred while executing this line:
C:\dev\tools\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:894: The following error occurred while executing this line:
C:\dev\tools\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:906: The following error occurred while executing this line:
C:\dev\tools\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:284: null returned: 1
Total time: 7 seconds
Rarely below error:
>phonegap build android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] compiling Android...
[error] An error occurred while building the android project.
If I run the build command again it throws the first error.
Thanks.