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

后端 未结 27 3576
被撕碎了的回忆
被撕碎了的回忆 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 06:03

    This issue also occur if you do an upgrade to you cordova installation.

    Check if your log error has something like:

    Checking Java JDK and Android SDK versions
    ANDROID_SDK_ROOT=undefined (recommended setting) <-------------
    ANDROID_HOME=/{path}/android-sdk-linux (DEPRECATED)
    Using Android SDK: /usr/lib/android-sdk
    Starting a Gradle Daemon (subsequent builds will be faster)
    

    In such case, just change ANDROID_HOME to ANDROID_SDK_ROOT in your ~/.bashrc or similar config file.

    Where before was:

    export ANDROID_HOME="/{path}/android-sdk-linux"
    

    Now is:

    export ANDROID_SDK_ROOT="/{path}/android-sdk-linux"
    

    Don't forget source it: $ . ~/.bashrc after edition.

提交回复
热议问题