繁体   English   中英

在 Visual Studio 中使用 ionic + Cordova 我不断收到“找不到已安装的构建工具。安装 Android 构建工具版本 19.1.0 或更高版本。”

[英]Using ionic + Cordova in visual studio i keep getting "No installed build tools found. Install the Android build tools version 19.1.0 or higher."

我看过很多关于这个的帖子,但这些帖子中的解决方案都没有解决我的问题。 我已经根据安装方式安装了 android sdk 并添加了 ANDROID_SDK_ROOT 系统变量。

这是我的文件夹结构:文件夹结构

这是我的系统变量System Variables

如果转到 powershell 并键入sdkmanager --list --verbose ,它将列出我所有已安装的软件包并包括所有构建工具。 然而,当我在 Visual Studio 中运行ionic cordova run android --verbose --no-native-run ,我收到以下错误:

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\android-sdk-windows (recommended setting)
ANDROID_HOME=C:\Android\sdk (DEPRECATED)
Using Android SDK: C:\Android\sdk
Subproject Path: CordovaLib
Subproject Path: app

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
Where:
Script 'C:\ProyectoTFG\IonicProject\MonitorApp\platforms\android\CordovaLib\cordova.gradle' line: 64

What went wrong:
A problem occurred evaluating project ':app'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.
Try:
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.
==============================================================================

2: Task failed with an exception.
-----------
What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle

Try:
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.

我无法让它与独立的 android sdk 一起工作。 我不得不卸载它并安装android studio。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM