0

I've tried everything but still my flutter app is not running ...installed(obsolete Sdk tools too)

Here's the traceback-

C:\Users\Sharath>flutter doctor -v
Downloading Gradle Wrapper...                                       1.2s
[√] Flutter (Channel stable, 1.20.2, on Microsoft Windows [Version 10.0.10586], locale en-US)
    • Flutter version 1.20.2 at C:\src\flutter
    • Framework revision bbfbf1770c (7 weeks ago), 2020-08-13 08:33:09 -0700
    • Engine revision 9d5b21729f
    • Dart version 2.9.1

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\Sharath\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = C:\Users\Sharath\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio1\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/docs/get-started/install/windows#android-setup for detailed instructions.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio1
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.49.1)
    • VS Code at C:\Users\Sharath\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.15.0

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

When i run in android studio it shows-

Downloading Gradle Wrapper...
Downloading Gradle Wrapper...
Failed to delete "C:\src\flutter\bin\cache\downloads\storage.googleapis.com\flutter_infra\gradle-wrapper\fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa\gradle-wrapper.tgz". Please delete manually. FileSystemException: Cannot delete file, path = 'C:\src\flutter\bin\cache\downloads\storage.googleapis.com\flutter_infra\gradle-wrapper\fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa\gradle-wrapper.tgz' (OS Error: The system cannot find the path specified.
, errno = 3)
Launching lib\main.dart on RMX1971 in debug mode...
Running Gradle task 'assembleDebug'...
Exception: Unable to locate gradlew script. Please check that C:\Users\Sharath\Desktop\flutter_app\android\gradlew.bat exists or that C:\Users\Sharath\Desktop\flutter_app\android can be read.
Shradha
  • 2,232
  • 1
  • 14
  • 26

1 Answers1

0

Looks like you have a few issues here:

  1. 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. Make sure to accept the licences for all your android sdks on your machine on Android Studio that you are working with.

You can run this command in order to accept all licences. yes | sdkmanager --licenses

Please take a look at community wiki's answer here for more information: Automatically accept all SDK licences

  1. Is it just Android that's giving you issues? If so, then looks like you might have to delete the Android projects from your solution, and remake them.

You can run this command to do that: flutter create .

Since you already have Android config enabled then it should be fine. Please make sure to backup your project before you do this

  1. Upgrade the flutter version from the stable channel. The most recent version is 1.22.0. Run this command here: flutter upgrade Then run this command: flutter upgrade doctor.

After you are done with this clean your project and rebuild your solution through the IDE that flutter is being developed on.

Dan Gerchcovich
  • 168
  • 5
  • 12