Android IONIC – No installed build tools found. Install the Android build tools version 19.1.0 or higher

Table of Contents

Android IONIC - No installed build tools found. Install the Android build tools version 19.1.0 or higher

Thông báo lỗi

> cordova.cmd build android
[INFO] ... and 78 additional chunks
[ng] i 「wdm」: Compiled successfully.
[cordova] (node:10100) [DEP0128] DeprecationWarning: Invalid 'main' field in 'D:\sync\websvr\ionic\current\nongnghiep_haugiang_appmobile_v2\node_modules\objectorarray\package.json' of 'dist/index.js'. Please either fix that or report it to the module author
[cordova] (Use `node --trace-deprecation ...` to show where the warning was created)
[cordova]
[cordova] FAILURE: Build completed with 2 failures.
[cordova]
[cordova] 1: Task failed with an exception.
[cordova] -----------
[cordova] * Where:
[cordova] Script 'D:\sync\websvr\ionic\current\nongnghiep_haugiang_appmobile_v2\platforms\android\CordovaLib\cordova.gradle' line: 64
[cordova]
[cordova] * What went wrong:
[cordova] A problem occurred evaluating project ':app'.
[cordova] > No installed build tools found. Install the Android build tools version 19.1.0 or higher.
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[cordova] ==============================================================================
[cordova]
[cordova] 2: Task failed with an exception.
[cordova] -----------
[cordova] * What went wrong:
[cordova] A problem occurred configuring project ':app'.
[cordova] > compileSdkVersion is not specified. Please add it to build.gradle
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[cordova] ==============================================================================
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 2s
[cordova] Command failed with exit code 1: D:\sync\websvr\ionic\current\nongnghiep_haugiang_appmobile_v2\platforms\android\gradlew cdvBuildDebug -b D:\sync\websvr\ionic\current\nongnghiep_haugiang_appmobile_v2\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd build android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

image

Cách fix No installed build tools found

Cập nhật lại biến môi trường platform-tools trỏ đến thư mục AppData của Android Studio là ok

C:\Users\soiqu\AppData\Local\Android\Sdk\platform-tools

image

Leave a Reply

Your email address will not be published. Required fields are marked *