ionic build Android | error: No installed build tools found. Please install the Android build tools

后端 未结 27 3458
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 05:25

When I run ionic build android command in root of ionic project, I am getting this error:

FAILURE: Build failed with an exception.

27条回答
  •  醉梦人生
    2020-11-28 05:51

    I fix this by downloading sdk package called platform-tools and buid-tools using sdkmanager. You can use sdkmanager.exe or if you are using SDK CLI, go to ~\AppData\Local\Android\sdk\tools\bin and run this command:

    sdkmanager "platform-tools" "platforms;android-26"
    

    or

    sdkmanager "build-tools;27.0.3"
    

    or both

    After that you should be able to run ionic cordova run android or ionic build android.

    Note: globalize sdkmanager command by adding ~\AppData\Local\Android\sdk\tools and ~\AppData\Local\Android\sdk\tools\bin to your environment variable.

提交回复
热议问题