簡體   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