-
Notifications
You must be signed in to change notification settings - Fork 329
Description
I originally filled a report with Android Studio: https://issuetracker.google.com/issues/443795727 , This was marked as 'Won't fix'. They suggested filing will the flutter team. Hence this report.
The hang occurs in an indexing loop in LibraryIndexableIteratorHandler()
. See thread dumps attached.
This problem occurred while I was trying make projects (created several years ago) usable with the latest upgraded flutter and a very recent download of Android Studio Narwal. See attached files. This is reproduce-able with a freshly created project using flutter:
Steps to reproduce:
- Create a dummy project with flutter:
flutter create dummy
- From the project root, remove gradle generated files:
rm -rf .idea android/.gradle .gradle *.iml ~/.gradle/caches/ ~/.gradle/daemon/
- Open the project in Android Studio. Android Studio hangs with all CPU cores maxed out. Pressing cancel on the right hand side of the status bar will give one back control, and one can edit project files, but Android Studio does not know about Gradle. The Gradle Menu is greyed out in Tool Windows, and Gradle does not appear in the right hand tool bar, and there is no gradle sync capability in Android Studio. Also after creating an android emulator, the project application will build and can be launched into the emulator.
Note that a command line build with flutter build apt -v
will run to completion successfully.
The problem can be avoided by removing the following line from ./android settings.gradle.kts
but android studio will not know about Gradle, and will not be able to execute gradle sync
.
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
After cancelling the indexing, the Gradle tool window and Gradle-related menu items are HIDDEN or unavailable in Android Studio.
This is 100% repeatable.
DiagnosticsReport20250909-113750.zip
doctor.txt
studio_version.txt
threaddump1.txt
threaddump2.txt