question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android Studio freezes with flutter when changing files

See original GitHub issue

Copied from @Elsrougy report at https://github.com/flutter/flutter/issues/54222:

I had flutter with android studio for a while now and everything is working great until one day in any flutter project when I try to open any file android studio freezes for few minutes. For example, if I was in the main.dart file and then switched/opened another file the freezing occurs, and that happens in any file not just main. This freezing doesn’t happen with normal android studio projects only with flutter

it’s worth mentioning that in android studio plugins it always says can’t load marketplace and to check the connection but I don’t know when did that started and if it is related or not.

Also flutter analyze is taking a long time with no output. I tried reinstalling flutter, reinstalling android studio, reinstalling flutter (stable and beta), installing android studio beta instead of stable and nothing happened still the same problem

attached is idea.log and threadDumps-freeze that android studio generates.

flutter doctor -v output:
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.657], locale en-US)
    • Flutter version 1.12.13+hotfix.9 at E:\src\flutter
    • Framework revision f139b11009 (8 days ago), 2020-03-30 13:57:30 -0700
    • Engine revision af51afceb8
    • Dart version 2.7.2


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at E:\Android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: E:\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at E:\Android Studio
    • Flutter plugin version 45.0.2
    • Dart plugin version 193.6911.31
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

logs.zip

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
angwandicommented, May 1, 2020

Microsoft Windows [Version 10.0.18363.815] © 2019 Microsoft Corporation. All rights reserved. i\myjiji_flutter>flutter doctor -v [√] Flutter (Channel beta, v1.17.0-3.3.pre, on Microsoft Windows [Version 10.0.18363.815], locale en-GB) • Flutter version 1.17.0-3.3.pre at C:\Users\demad\flutter • Framework revision 0da1ab0922 (3 days ago), 2020-04-28 11:02:34 -0700 • Engine revision 376ad6a64b • Dart version 2.8.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at C:\Users\demad\AppData\Local\Android\sdk • Platform android-29, build-tools 29.0.2 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04) X Android license status unknown. Try re-installing or updating your Android SDK Manager. See https://developer.android.com/studio/#downloads or visit visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.

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

[√] Android Studio (version 3.6) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 46.0.1-dev.3 • Dart plugin version 192.7761 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] IntelliJ IDEA Ultimate Edition (version 2019.3) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2019.2 • Flutter plugin version 42.1.4 • Dart plugin version 193.5731

[√] VS Code (version 1.44.2) • VS Code at C:\Users\demad\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.10.0

[√] Connected device (4 available) • moto g 6 plus • ZY32389KCQ • android-arm64 • Android 9 (API 28) • TV358DVB • 192.168.88.95:5555 • android-arm64 • Android 8.0.0 (API 26) • Chrome • chrome • web-javascript • Google Chrome 81.0.4044.129 • Web Server • web-server • web-javascript • Flutter Tools

! Doctor found issues in 1 category.

Completely freezing my system when I run a flutter project.

3reactions
Elsrougycommented, Apr 8, 2020

@jmagman, @Elsrougy: super sorry for the hassle here.

@stevemessick kicked off a dev build with the fix. If you want to give that a whirl, the instructions are in the wiki here:

https://github.com/flutter/flutter-intellij/wiki/Dev-Channel

Having added the channel, you should see an update that looks like this:

image

That was a really fast response, Thank You!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter app freezes when running under Android Studio
After switching to stable channel problem disappeared: flutter channel stable. However it broke android compilation. Fixed it with:
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix the issue for the current project, click Run > Edit Configurations and change the default JUnit configuration to only include the...
Read more >
Debug your database with the Database Inspector
The Database Inspector lets you inspect, query, and modify your app's databases while your app is running. This is especially useful for database...
Read more >
ANRs - Android Developers
When the UI thread of an Android app is blocked for too long, an "Application Not Responding" (ANR) error is triggered. If the...
Read more >
Support 64-bit architectures - Android Developers
Look for native libraries using APK Analyzer · Open Android Studio, and open any project. · From the menu, select Build > Analyze...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found