How to solve: Android license status unknown and also Android sdkmanager tool not found?

怎甘沉沦 提交于 2020-04-18 06:54:07

问题


Tried everything i had found(github issues, SO questions) . Also tried to re-install Android SDK(29) from Android Studio.

  1. flutter doctor

    C:\Users\Zheny>flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.693], locale ru-RU)
    [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        X Android license status unknown.
          Try re-installing or updating your Android SDK Manager.
          See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed      instructions.
    [√] Android Studio (version 3.6)
    [!] VS Code (version 1.42.1)
        X Flutter extension not installed; install from
          https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    [!] Connected device
        ! No devices available
    ! Doctor found issues in 3 categories.
    
  2. flutter doctor --android-licenses

    Android sdkmanager tool not found 
    (C:\Users\Zheny\AppData\Local\Android\Sdk\tools\bin\sdkmanager).
    Try re-installing or updating your Android SDK,
    visit https://flutter.dev/setup/#android-setup for detailed instructions.
    
  3. flutter doctor -v

    C:\Users\Zheny>flutter doctor -v
    [√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.693], locale ru-RU)
    • Flutter version 1.12.13+hotfix.8 at C:\Flutter SDK\flutter
    • Framework revision 0b8abb4724 (2 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0
    
    [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\Zheny\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = C:\Users\Zheny\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
    
    [√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    
    [!] VS Code (version 1.42.1)
    • VS Code at C:\Users\Zheny\AppData\Local\Programs\Microsoft VS Code
    X Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    
    [!] Connected device
    ! No devices available
    
    ! Doctor found issues in 3 categories.
    
  4. Screens of my PATH's and folders

How can i sovle this problem?


回答1:


download https://developer.android.com/studio#command-tools and extract in

C:\Users\Zheny\AppData\Local\Android\Sdk folder

and set path like this

C:\Users\Zheny\AppData\Local\Android\Sdk\tools\bin

restart power-shell or command prompt and execute flutter doctor --android-licenses




回答2:


Depending on your install paths, your System Variables should have: ANDROID_HOME C:\Users\\AppData\Local\Android\sdk JAVA_HOME C:\Program Files\Android\Android Studio\jre\

your Path should have: C:\Program Files\Android\Android Studio\jre\bin C:\src\flutter\bin

Then run "flutter doctor" from command prompt (without the quotation marks).

If same error occur, open Android Studio, go to Settings and navigate to "Appearance & Behavior > System Settings > Android SDK", then at the top of the window and to the right of Android SDK Location, click on Edit, and from the window that opens, update your current SDK Manager and install the latest API if not already installed; once everything is updated or installed in this windows, close the Android Studio and close the command prompt.

Open a new command prompt and run "flutter doctor" again (without the quotation marks). Follow the software instructions to accept all Android Licenses.




回答3:


Follow these steps

  • Open the Android Studio SDK Manager
  • In the Android SDK tab, uncheck Hide Obsolete Packages
  • Check Android SDK Tools (Obsolete)

Source: https://flutter.dev/docs/get-started/install/macos#install-android-studio




回答4:


follow these steps:

  1. open SDK Manager
  2. go to SDK tools
  3. Delete the "Android SDK Tools" from SDK Manager
  4. first deselect the "Hide Obsolete Packages" and then select "Android SDK Tools (Obsolete)", install it.

  5. run flutter doctor --android-licenses and select y for the prompts.

run flutter doctor and everything will be fine!!!!



来源:https://stackoverflow.com/questions/60464016/how-to-solve-android-license-status-unknown-and-also-android-sdkmanager-tool-no

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!