Error building Player: Exception: android (invokation failed)

I had my project running and everything was fine. Then i tried adding in some files to get Google play game services to work in my game and everything went wrong. I added in a few files and silly me saved the project and now all i get is the errorr below. I have tried updating SDK tools and remving the files i added but nothing works. Please help.

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)

It looks like Unity Android builds break when using the latest Android SDK.

Please check this link.
http://forum.unity3d.com/threads/176737-unknown-error-when-building-simple-scene

BitWize is right.

The latest version of the android SDK Tools (r22) breaks compatibility with Unity compiler.

The best solution is downgrading to r21 and everything will work again.

As mentioned by jvil in the forum thread:

copy the content from folder:

android-sdk/build-tools/17.0.0/

to

android-sdk/platform-tools/