It is the same as install the SDK Tools in the sdk manager. I had this problem and it .... SDK Manager failed to install 'java.exe' locking directory.
stackoverflow.com