Unable to publish apk file with Android SDK (Exception: android (invokation failed))

Pre-requisite detail:

  1. Have to use Unity Version 3.5.7 (I can’t use a newer version because this is a school project and the school is unwilling to upgrade or purchase a new license for newer versions)

PROBLEM : (STATED BELOW)
Keep getting error even when building empty scene
Error building Player: Exception: android (invokation failed)
ERROR: unknown error
cmd:android list target -c
stdout;
stderr:
Exception in thread “main” java.lang.NullPointerException
at SDKMain.main(SDKMain.java:62)

I have searched all over the Unity forums and they have all told me to use Revision 21 of Android SDK and I have tried but still get the same error. I am unsure if the reason for failing is because I cannot seem to update my Android SDK platform tools. As seen by the picture below, when i install the Android SDK platform- tools , it is still shown as not installed. Help please. This project will only end when i publish this app.

Extra Info: Even thought the android sdk platform tools says that its not installed, the platform tools folder seem to have installed the information. I am really confused if it was successful or not. If it was succesful, why is Revision 21 not solving the issue of invokation failed. Thanks for the answers in advance.

Solved it by following the steps mentioned above :

Solution :

copy the content from folder:

  • android-sdk/build-tools/17.0.0/

to

  • android-sdk/platform-tools/