Unity - Android SDK error

Hello, please I need help. When i want build my project for Android, will appear errors and building is canceled. How Can I solve it?
Thank you very much.

Error:

Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:\Program Files (x86)\Java\jdk1.8.0_131\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir=“D:/Android ools” -Dfile.encoding=UTF8 -jar “D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -

stderr[
Error:Invalid command android
]
stdout[

]
exit code: 64

Tested on Unity 2017.1.0b1 Beta

  1. Delete tools folder from SDK path
  2. Download SDK Tools r25.2.5
  3. Extract tools folder from downloaded *.zip to sdk path
  4. On Unity, select Gradle build type, tick Export, hit Export button
  5. Import to Android Studio, update back SDK Tools to 26.0.1
  6. Add to Manifest “internet permission”,
  7. Build

If there will be errors on Android Studio, clean , rebuild, relaunch ide, delete build folder can help.

I i wrote down an article about clean Unity/AndroidSDK installation which also solves this issue: http://devlog.markhlavac.com/2017/06/30/installing-android-sdk-for-unity3d-using-sdk-tools-and-cli/

Hello,

Does anyone know if this problem is planned to be fixed anytime soon?
I have tried this fix (going through SDK Tools r25.2.5) without success…
It’s been two~three days I am trying to build my game on Android without success because of this bug, though it successfully builds on Windows and IOs…
When I apply @zakirshikhli solution I get many errors when I try to build on Android Studio, very unclear errors that I have no clue how to solve…

here’s a video tutorial on how to change the sdk tool folder: - YouTube

-you need jdk 8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html:

-SDK Tools r25.2.5: http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip

I will provide a working package of Unity, Android SDK, NDK, JDK programs.
Ask in the mail turtletools3@gmail.com