How to fix “Error - Failed to execute tools\android.bat, error 2 ” in Android?

后端 未结 13 1602
死守一世寂寞
死守一世寂寞 2020-12-17 10:28

When i click on AVD Manager, i am getting an error as in the screenshot below.

Referred to the following links. But none of the solution works for me.

Failed

13条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-17 10:37

    My android.bat file was missing when updating the particular SDK package and my computer suddenly shut down. Thus, my tools folder became empty.

    enter image description here

    You can recover your android.bat file from temp folder

    enter image description here

    1. Manually unzip tools_r23.05-windows or any tool_rXX.zip file (red color)

    2. Get a folder called tools (orange color)

    3. Copy all the file in this folder to the original tools folder (outside temp folder, e.g. D:\android-sdk\tools)

    In my case, the problem was solved this way. Hope this helps.

提交回复
热议问题