Flutter-intellij: ide is blinking since some upgrades

Created on 27 Mar 2018  Â·  23Comments  Â·  Source: flutter/flutter-intellij

Please file this bug report at https://github.com/flutter/flutter-intellij/issues/new.


What happened

Upgraded Android studio and flutter. I have the flutter_mates example project with some modifications running, not it seems to be blinking a bit in the IDE. ALso have both an android and iphone emular set up, but only the iphone emulator shows.

Version information

Android Studio 3.1 • Flutter plugin io.flutter 22.2.2 • Dart plugin 173.4700

Flutter 0.2.5-pre.41 • channel master • https://github.com/flutter/flutter.git
Framework • revision 2171fcb882 (2 days ago) • 2018-03-25 00:04:24 -0700
Engine • revision 6280adbfb1
Tools • Dart 2.0.0-dev.39.0.flutter-06949dc985

Exception

A Flutter device daemon stopped unexpectedly.
Details: Daemon #92 exited. Exit code: 255. Stderr:

Unhandled exception:
Exception: adb not responding
#0      throwToolExit (package:flutter_tools/src/base/common.dart:28)
#1      AndroidDevice._getProperty (package:flutter_tools/src/android/android_device.dart:98)
<asynchronous suspension>
#2      AndroidDevice.targetPlatform (package:flutter_tools/src/android/android_device.dart:129)
<asynchronous suspension>
#3      _deviceToMap (package:flutter_tools/src/commands/daemon.dart:722)
<asynchronous suspension>
#4      DeviceDomain._onDeviceEvent.<anonymous closure>.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:602)
<asynchronous suspension>
#5      _rootRunUnary (dart:async/zone.dart:1134)
#6      _CustomZone.runUnary (dart:async/zone.dart:1031)
#7      _FutureListener.handleValue (dart:async/future_impl.dart:129)
#8      _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:633)
#9      _Future._propagateToListeners (dart:async/future_impl.dart:662)
#10     _Future._addListener.<anonymous closure> (dart:async/future_impl.dart:342)
#11     _rootRun (dart:async/zone.dart:1126)
#12     _CustomZone.run (dart:async/zone.dart:1023)
#13     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949)
#14     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#16     _Timer._runTimers (dart:isolate-patch/dart:isolate/timer_impl.dart:391)
#17     _Timer._handleMessage (dart:isolate-patch/dart:isolate/timer_impl.dart:416)
#18     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
com.intellij.openapi.diagnostic.Logger$EmptyThrowable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:159)
    at io.flutter.run.daemon.DeviceService.daemonStopped(DeviceService.java:189)
    at io.flutter.run.daemon.DeviceDaemon$Listener.processTerminated(DeviceDaemon.java:357)
    at io.flutter.run.daemon.DaemonApi$1.processTerminated(DaemonApi.java:146)
    at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.execution.process.ProcessHandler$5.invoke(ProcessHandler.java:239)
    at com.sun.proxy.$Proxy16.processTerminated(Unknown Source)
    at com.intellij.execution.process.ProcessHandler$4.run(ProcessHandler.java:196)
    at com.intellij.execution.process.ProcessHandler$TasksRunner.execute(ProcessHandler.java:272)
    at com.intellij.execution.process.ProcessHandler.notifyTerminated(ProcessHandler.java:177)
    at com.intellij.execution.process.ProcessHandler.notifyProcessTerminated(ProcessHandler.java:173)
    at com.intellij.execution.process.BaseOSProcessHandler.onOSProcessTerminated(BaseOSProcessHandler.java:192)
    at com.intellij.execution.process.OSProcessHandler.onOSProcessTerminated(OSProcessHandler.java:89)
    at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:155)
    at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:140)
    at com.intellij.execution.process.ProcessWaitFor$1.run(ProcessWaitFor.java:66)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Most helpful comment

Android Studio 3.1.3
Build #AI-173.4819257, built on June 4, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Resolved for me in -> File -> Invalidate Caches / Restart ... -> Invalidate and Restart

All 23 comments

The Flutter plugin was updated to version 23 today. Does upgrading your version help with these problems?

It actually it doesn't...i think i have a better understanding of what I do as a user to trigger, but have no idea how to fix or what is being done. I'm a new to flutter and messing around with it, everything was actually going pretty smooth till recently.

I noticed if I take one of the examples (ie the flutter_gallery) out and put it in my project directory then open the folder with android studio and then give it the path to the flutter SDK and click the nice android studio flutter get dependancies link everything goes great and I can run it in ios emulator.

In the even log, there is a message that comes up stating:

Frameworks Detected
Android framework is detected.
Configure

Where "configure" is a link.

I click the link, run what ever is at the default prompt...and then THAT IS WHEN THE PROBLEM IS INTRODUCED. I have no idea what settings it is activating...but that is where the blinking and constant "indexing" begins with no way that I know to remove it from the project. I tried doing steps in stack overflow for the indexing issue some other people have faced in the past, but no luck.

I encountered this problem yesterday when I updated Android Studio to 3.1, and updated the Dart and Flutter plugin. The IDE kept reindexing the files, causing a "blinking" effect. The issue should be caused by Flutter plugin in the last update (prior to v23), and had been fixed here. Also see #1735.

Note that I had to manually delete the .idea directory, and reconfigure the project (re-enable Dart and Flutter support) again after updating the Flutter plugin to v23 to fix the constantly reindexing behavior. In #1735 there's also a fix via manually editing the .iml file (it doesn't work for me though, ALLOW_USER_CONFIGURATION is already false in my android/app/app.iml file).

+1 for this issue it's driving me bonkers

@stevemessick FTR this only starting happening to me once i upgraded flutter+AS

The OP describes two separate problems. We're going to ignore the missing emulator for now, since no one else has commented on that.

To eliminate the blinking you need to close all projects, upgrade the Flutter plugin from the Preferences page, shut down Android Studio, restart it, and manually re-open any project(s). Note: there are two ways to re-open a project but _only one of them works to eliminate the refresh_. Use the
Open an existing Android Studio project
item on the Welcome screen. If you have already upgraded the Flutter plugin you shouldn't need to do so again. Just close and re-open the projects, using the Welcome screen as described.

Using File>Open Recent from the menu or selecting a project from the list on the left-hand side of the Welcome screen will not work. Sorry, but that's just the way the framework operates. You have to invoke an open-pathway in the code that treats the project as a first-time open, not a repeat open.

@devoncarew We should communicate this re-open issue better. It will only affect a few people, and only once during this upgrade process, but it is really disruptive.

To keep this issue as current as the others; @tamcy' suggestion of killing the .idea folder worked for me, but closing and re-opening the project alone still resulted in Android Seizure

Apologies @stevemessick and @tamcy but the twitch is back. I tried removing my .idea folder again, tried closing/opening the project a couple more times, still twitching.

Here's the bottom of editor:

twitch1

and top right

twitch2

@stevemessick I also did try your steps as well to completely close the project, re-install/upgrade the flutter plugin, then re-open the project again.

Downgrading AndroidStudio to 3.0.1 seems to have fixed this issue

https://developer.android.com/studio/archive.html

driving me bonkers too, and if you have a slower computer you see android studio using more cpu resources and sucking up battery when the issue is occurring.

@acidjazz or @mrbm, can you PM me at [email protected] - I'd like to send you a new plugin binary to try to see if this addresses the issue. Thanks!

@devoncarew PM sent

We've released a new version w/ the settings fix from @stevemessick. I'm closing this as assumed fixed - people should see the update available in Android Studio shortly. Thanks all for the feedback!

@devoncarew Was the new version with the fix released yet to the stable channel or is it only available in Canary channel?
Btw this happens to me on a regular Android Java project, no Kotlin or Flutter involved.

I'm using Android Studio 3.1.1 with Gradle 4.4 and Android plugin 3.1.1.
My project is a multi-module project (not sure if it's related).

I've just noticed that this is a repo for flutter (arrived here from a Google search on AS indexing all the time) so this might not be the best place to post it.
Sorry about that, but I couldn't find anywhere else where this issue was being discussed.

I've submitted an Android Studio bug report - https://issuetracker.google.com/issues/78378464

New version hasn't solved the problem. Visual Studio still blinks and is constantly trying to index something. It is totally unusable. Please fix ASAP!

Hi all, if your comments are about continuous indexing when using Android Studio - without it being a Flutter project - please follow up on the above Android Studio bug; thanks!

Android Studio 3.1.3
Build #AI-173.4819257, built on June 4, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Resolved for me in -> File -> Invalidate Caches / Restart ... -> Invalidate and Restart

Still getting this in IntelliJ Ultimate (Build #IU-182.3684.101, built on July 24, 2018).

Tried upgrading flutter, invalidating caches, deleting .idea and re-opening the project. ALLOW_USER_CONFIGURATION is already false. Still twitching.

Same issue here with IntelliJ IDEA 2018.2 (Ultimate Edition)
Build #IU-182.3684.101
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
Dart Plugin 182.3911.9
Flutter Plugin 27.1.3

For some time now the little lightbulb that helps you with suggestions and things like instant wrapping of the selected widget in code with another one blinks almost like the cursor. This makes it insanely hard to click it :(

Android Studio 3.1.4
Build #AI-173.4907809, built on July 24, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v0.7.2, on Microsoft Windows [Version 10.0.17134.285], locale en-NZ)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.1)
[√] IntelliJ IDEA Community Edition (version 2017.3)
[√] Connected devices (1 available)

• No issues found!

Facing the same!

changed to the actual resolution fixed the issues

Was this page helpful?
0 / 5 - 0 ratings