0

I create a empty flutter application and I got this error when I run this in android emulator. I already installed java, AD (4.1),git but don't know what happens. If anyone has idea let me know. Thanks :)

error log

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following SDK components:
      build-tools;28.0.3 Android SDK Build-Tools 28.0.3
      platforms;android-29 Android SDK Platform 29
  Install the missing components using the SDK manager in Android Studio.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 

* Get more help at https://help.gradle.org

flutter doctor full summary

    PS F:\Flutter\flutter_application_1> flutter doctor -v [√] Flutter (Channel stable, 2.0.0, on Microsoft Windows [Version 10.0.19042.804], locale en-US)
    • Flutter version 2.0.0 at C:\src\flutter
    • Framework revision 60bd88df91 (16 hours ago), 2021-03-03 09:13:17 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) 
    • Android SDK at C:\Users\vaagm\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java       
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.53.2)
    • VS Code at C:\Users\vaagm\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.20.0

[√] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 5.1.1 (API 22) (emulator)
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 88.0.4324.190
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 88.0.705.81

• No issues found!
Vishal D Rajpara
  • 43
  • 1
  • 1
  • 4

2 Answers2

0

After some searching, according to this question, you need to accept android licenses. Check this out and let us know your results :) Hope it will help

Alex Altiox
  • 136
  • 7
0

The solution is there in the error message. you need to install following SDK components: build-tools; 28.0.3 Android SDK Build-Tools 28.0.3 platforms; android-29 Android SDK Platform 29 Install the missing components using the SDK manager in Android Studio.

Go to File>settings>Appearance & Behaviour>System settings>Android SDK> And install the mentioned sdk build tools,platform.

NiiLx
  • 606
  • 7
  • 18