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

本文解决了在使用Cordova进行混合应用开发时遇到的构建错误:“Noinstalledbuildtoolsfound.InstalltheAndroidbuildtoolsversion19.1.0orhigher”。通过调整cordova.gradle和build.gradle文件中的SDK路径及构建工具版本,成功修复了该问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这是我在混合开发,使用cordova的时候遇到的,当我导入cordova项目的时候报了一个这样的问题:No installed build tools found. Install the Android build tools version 19.1.0 or higher.

我查了好多资料,很多都说修改sdk目录下build-tools下的版本,如把android-22改成22。但是我发现我的都是22.0.2这样的形式。

后来解决的方法:
将CordovaLib下面的cordova.gradle

这里写图片描述

将 System.getenv(“ANDROID_HOME”) 改为你的SDK目录。

第二步将你的CordovaLib下面的build.gradle中的 buildToolsVersion 改为你自己又得版本。

谢谢大家!

PS D:\Desktop\EAP本地\EAPAdmin\ADM_Client> npm install --global windows-build-tools npm WARN deprecated windows-build-tools@5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details. npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. > windows-build-tools@5.2.2 postinstall E:\nodejs\node_global\node_modules\windows-build-tools > node ./dist/index.js ... and 1 more Downloaded vs_BuildTools.exe. Saved to C:\Users\shiningtang\.windows-build-tools\vs_BuildTools.exe. Starting installation... Please restart this script from an administrative PowerShell! The build tools cannot be installed without administrative rights. To fix, right-click on PowerShell and run "as Administrator". npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! windows-build-tools@5.2.2 postinstall: `node ./dist/index.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the windows-build-tools@5.2.2 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! E:\nodejs\node_cache\_logs\2025-07-10T01_51_11_574Z-debug.log
最新发布
07-11
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值