Flutter does not find android sdk

前端 未结 25 2016
花落未央
花落未央 2020-12-02 09:29

I just tried intalling flutter and since I already had android studio and the android sdk installed I just followed the installation of flutter. Here is my problem: When I r

相关标签:
25条回答
  • 2020-12-02 10:27

    SdkManager removes the API28 version and re-downloads the API28 version, setting the Flutter and Dart paths in AndroidStudio, and now it works fine. image

    0 讨论(0)
  • 2020-12-02 10:29

    First open Android SDK Manager and make sure the required SDK's are installed.

    Now open SDK manager, copy the SDK path. Open cmd

    cd C:\Users\your-username\AppData\Local\Android\Sdk\build-tools
    

    now again Change dir to the inner folder in build-tools. check the presence or the name issues of the aapt.exe file.

    0 讨论(0)
  • 2020-12-02 10:29

    Deleting and reinstalling Android Studio fixes the issue with the SDK.

    0 讨论(0)
  • 2020-12-02 10:30

    In my SDK folder there were a empty folder (/build-tools/29.0.0)

    I deleted it, and it worked fine

    0 讨论(0)
  • 2020-12-02 10:30

    For mac users,

    It was working fine yesterday, now the hell broke. I was able to fix it.

    My issue was with ANDROID_HOME

    // This is wrong. No idea how it was working earlier.
    ANDROID_HOME = Library/Android/sdk 
    

    If you did the same, change it to:

    ANDROID_HOME = /Users/rana.singh/Library/Android/sdk 
    

    .bash_profile has

    export ANDROID_HOME=/Users/rana.singh/Library/Android/sdk
    export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    
    0 讨论(0)
  • 2020-12-02 10:31

    For me, adding the Android SDK path didn't help.

    I deleted all my SDKs (basically just deleted that Android folder. Used this path "C:\Users\your_user_name\AppData\Local\Android" to locate it.)

    I then reinstalled all the required SDKs using android studio. (Be sure to install more than 1 SDK, I don't know why it doesn't work if you only install 1).

    Then if I run Flutter Doctor, every thing works perfectly.

    0 讨论(0)
提交回复
热议问题