如何安装Flutter升级错误的Android SDK命令行工具?

时间:2020-09-11 00:12:25

标签: flutter android-sdk-tools

如何在没有Display / GUI的Ubuntu远程服务器上安装Android SDK命令行工具。 运行时,“ flutter upgrade”会显示以下内容,我想知道是否可以使用Android SDK命令行工具来解决此问题。

$flutter upgrade                                                                                
Upgrading Flutter from /home/yvelumani/flutterDev/sdk/flutter...  
Building flutter tool...`

Upgrading engine...
Downloading Android Maven dependencies...
Failed to download the Android dependencies
Downloading Android Maven dependencies...                         127.7s (!)

Flutter 1.22.0-10.0.pre.133 • channel master • https://github.com/flutter/flutter.git  
Framework • revision 577de1c44e (46 minutes ago) • 2020-09-10 15:55:03 -0700  
Engine • revision fee6f9e533  
Tools • Dart 2.10.0 (build 2.10.0-110.0.dev)

Running flutter doctor...   
Doctor summary (to see all details, run flutter doctor -v):  
[✓] Flutter (Channel master, 1.22.0-10.0.pre.133, on Linux, locale en_US.UTF-8)  
[!] Android toolchain - develop for Android devices   
    ✗ Unable to locate Android SDK.  
      Install Android Studio from: https://developer.android.com/studio/index.html  
      On first launch it will assist you in installing the Android SDK components.  
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).  
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.  
      You may also want to add it to your PATH environment variable.

    ✗ Android SDK file not found: adb.  
[!] Android Studio (not installed)  
[✓] Proxy Configuration  
[!] Connected device  
    ! No devices available  

! Doctor found issues in 3 categories.

我已经从https://developer.android.com/studio#command-tools下载了android SDK命令行工具。但是我不确定如何安装此工具,以及选择哪种路径作为ANDROID_HOME?

注意:我不能/不能使用Android Studio进行应用开发。

非常感谢您的帮助。

0 个答案:

没有答案