Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I cannot run my flutter app. It says Flutter requires Android SDK 28, and I have sdk 28

Tags:

sdk

flutter

dart

when I run flutter doctor, it shows me the following errors:

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.112], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 27.0.3)
    X Flutter requires Android SDK 28 and the Android BuildTools 28.0.3
      To update using sdkmanager, run:
        D:/Tools/sdk\tools\bin\sdkmanager "platforms;android-28" "build-tools;28.0.3"
      or visit https://flutter.io/setup/#android-setup for detailed instructions.
    X Android license status unknown.
[?] Android Studio (version 3.3)
[!] IntelliJ IDEA Ultimate Edition (version 2017.1)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[?] VS Code (version 1.26.1)
[?] Connected device (1 available)
like image 446
Mukhtar Asorori Avatar asked Mar 18 '19 12:03

Mukhtar Asorori


People also ask

Is Android SDK required for flutter?

Before you can use Flutter, you must agree to the licenses of the Android SDK platform. This step should be done after you have installed the tools listed above. Make sure that you have a version of Java 8 installed and that your JAVA_HOME environment variable is set to the JDK's folder.

Is flutter SDK same as Android SDK?

Flutter is a mobile app SDK to help developers and designers build modern mobile apps for iOS and Android. Android SDK belongs to "Frameworks (Full Stack)" category of the tech stack, while Flutter can be primarily classified under "Cross-Platform Mobile Development".


1 Answers

You need to download

1- Android SDK version 28

Android Studio -> SDK Manager -> SDK Platforms tab -> Select Android 9.0 Pie and press ok to download it

2- Android BuildTools version 28.0.3

Android Studio -> SDK Manager -> SDK Tools tab -> Select Show Package Details -> Under Android SDK Build-Tools section select 28.0.3 and press ok to download it

3- then Create and run Project

4- If the problem is still present, add

C:\Program Files\Git\bin\git.exe;C:\Program Files\Git\cmd;C:\Windows\System32 

to your PATH variable

Do not create new variable for git but add them as I did one after another separating them by ;

like image 128
Marwa Eltayeb Avatar answered Sep 18 '22 13:09

Marwa Eltayeb