0

So today I freshly installed android studio for flutter. I followed every step given on the flutter website. Yet I came across multiple issues at different point of time.

List Of Events: 1. Tried to run the app, the Gradle task assembleDebug Kept On loading and i found out i need to install Android API 28, That being done now came the

C:\Users\DELL\AndroidStudioProjects\example>flutter run
Launching lib\main.dart on ASUS X00TD in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        38.3s
Gradle task assembleDebug failed with exit code -1

After wandering of the internet, One solution prominently given was to install the 'Android SDK Tools (Obsolete). turns out i have already installed it.

Click Here For The Snapshot

  1. Now running upon flutter doctor it shows
C:\Users\DELL>flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.17763.914], locale en-US)
    • Flutter version 1.12.13+hotfix.5 at C:\flutter\flutter
    • Framework revision 27321ebbad (6 months ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\DELL\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.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)
    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 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.45.1)
    • VS Code at C:\Users\DELL\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.11.0

again wandering on the internet i found out that this error might have to deal with it. so again the same solution came up : install the 'Android SDK Tools (Obsolete).'

  1. running upon flutter doctor --android-licenses it showed that sdkmanager is missing. so i manually downloaded the commandtoollines from the android studio website(this one had 'sdkmanager.bat' which was missing in the orginal one;, and pasted it to the required folder. Now I am getting a new error yay!!!!!.
C:\Users\DELL>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Users\DELL\AppData\Local\Android\sdk\tools\bin\sdkmanager --update

So i would highly appreciate someone if anyone could help me out.

B001ᛦ
  • 2,036
  • 6
  • 23
  • 31

1 Answers1

0

In Android Studio, there is a tab at the bottom of the screen that says Terminal, This is where this tab is located at the bottom of the screen

Copy and paste the following statement into the terminal and run it C:\Users\DELL\AppData\Local\Android\sdk\tools\bin\sdkmanager --update

Hopefully after the update is done, things should go alright. Otherwise, you might need to run some other statements and check what else is missing. Installing Android studio may be a bit tedious because it depends on a lot of factors to run properly.

M. Abdel-Ghani
  • 187
  • 1
  • 10