Reputation: 59
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:\src\flutter
• 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:\Users\adria\AppData\Local\Android\sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• 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 Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 2020.3)
• 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 11.0.10+0-b96-7249189)
[√] VS Code (version 1.61.2)
• VS Code at C:\Users\adria\AppData\Local\Programs\Microsoft 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
Upvotes: 4
Views: 10862
Reputation: 1499
My case is I use fvm
for flutter version control, it seem somehow the cache data is corrupt. and I solved this problem by simply reinstalling the specific flutter version by these commands:
fvm remove 3.22.2
and
fvm install 3.22.2
Upvotes: 0
Reputation: 11
I had the same issue, and it worked for me by just running Android Studio as an administrator
Upvotes: 1
Reputation: 31
I have the same problem just worked after doing this on Mac OS : go to system settings then select privacy and security then open Full Disk Access then allow access to android studio
Upvotes: 1
Reputation: 313
I just ran into this after upgrading to Android Studio Flamingo (2022.2.1). None of the other suggestions here made any difference. The only things that has worked for me so far is to run Android Studio as Administrator. No idea why that works.
Upvotes: 2
Reputation: 164
I got exact same problem and fixed it by running
flutter clean
and then
flutter pub get
Upvotes: 2
Reputation: 96
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.
Upvotes: 1
Reputation: 1189
Now Start Emulator again.
Upvotes: 0