Nativescript&q;警告:Android SDK未安装或配置不正确&q;

Nativescript quot;WARNING: The Android SDK is not installed or is not configured properlyquot;(Nativescriptq;警告:Android SDK未安装或配置不正确q;)

本文介绍了Nativescript&q;警告:Android SDK未安装或配置不正确&q;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个常见问题,但无论存在多少解决方案,我似乎都无法修复它。

我也不明白的是,为什么TNS Doctor在同一台计算机上的另一个用户上工作得很好,但是,我在我的用户上收到了以下错误。有什么想法吗?

✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 6.7.8 and the latest available version is 8.1.5.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 12.5.1 satisfies minimum required version 10.
✖ WARNING: The Android SDK is not installed or is not configured properly.

以下是我的环境变量,请注意,在TNS Doctor工作正常的用户中,这些变量是相同的。

$ANDROID_HOME = usr/local/share/android-sdk
$ANDROID_SDK_ROOT = usr/local/share/android-sdk
$PATH=/Users/jenkins/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:

我已尝试重新安装nativescript。

提前感谢

推荐答案

请确保您的Android SDK已安装,并根据实际安装的sdk文件夹(见下文)指向$ANDROID_HOME $ANDROID_SDK_ROOT内部。

我发现最好的检查方式是安装Android Studio,然后打开SDK管理器:

然后仔细检查Android-SDK位置是否与上面的$ANDROID_HOME $ANDROID_SDK_ROOT匹配,并确保选中的包如下图所示:

(我安装的Android SDK构建工具-橙点-是30.0.2和26.0.3版本,而不是最新版本)。

另外,请确保您已在以下屏幕上安装了所需的Android API:

请确保通过重新启动终端或运行source ./bash_profile重新加载环境变量。

这篇关于Nativescript&q;警告:Android SDK未安装或配置不正确&q;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Nativescript&q;警告:Android SDK未安装或配置不正确&q;

基础教程推荐