skip to Main Content

I get this error every time I open my project in android studio

-flutter doctor -v

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1415], locale en-US)
• Flutter version 2.8.1 at C:srcflutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (11 days ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
                                                                       
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:UsersadriaAppDataLocalAndroidsdk
• Platform android-31, build-tools 31.0.0
• Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:Program FilesGoogleChromeApplicationchrome.exe

[√] Android Studio (version 2020.3)
• Android Studio at C:Program FilesAndroidAndroid 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 11.0.10+0-b96-7249189)

[√] VS Code (version 1.61.2)
• VS Code at C:UsersadriaAppDataLocalProgramsMicrosoft VS Code
• Flutter extension can be installed from:
   https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (3 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
• Chrome (web)                       • chrome        • web-javascript • Google Chrome 96.0.4664.45
• Edge (web)                         • edge          • web-javascript • Microsoft Edge 96.0.1054.62

• No issues found!

I already tried flutter clean, flutter upgrade, reset my laptop and changed in gradle.properties

org.gradle.jvmargs=-Xmx1536M  => org.gradle.jvmargs=-Xmx1024M

I was using a simulator devices but now from android studio I can’t run the application because they don’t appear to me

I also can’t run commands in android studio like flutter doctor, flutter clean, pub get, flutter upgrade
I can only do it from the terminal

3

Answers


    • Open Android Studio Tools
    • AVD Manager Virtual Device
    • Actions Click On Wipe data

    Now Start Emulator again.

    Login or Signup to reply.
  1. This is a bit old, but I have seen a similar issue when trying to load a project from an external drive, or if I have accessed the same project from Mac and PC installations of Android Studio.

    It appears to be an issue associated with the location of the flutter sdk, where Android Studio ‘forgets’ the correct location. I have seen issues where the path has been deleted or changed, and that can cause this problem (I have also seen the path to the dart sdk deleted as well).

    Going into Preferences/Settings and changing the flutter sdk location to the correct location for the installation, (and the same for the dart sdk if required) appears to resolve the issue (at least for me). I would say that this is probably a bug in Android Studio.

    Login or Signup to reply.
  2. I got exact same problem and fixed it by running

    flutter clean
    

    and then

    flutter pub get
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search