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 indexing every 2 seconds

See original GitHub issue

In Android Studio 3.1 Beta 1 (and 3.2 Canary 1) indexing is triggered every 2 seconds, which makes e.g. code completion tooltips go away. Excerpt from the log (this continues forever):

2018-02-04 12:39:19,749 [e-1024-b01]   INFO - pl.ProjectRootManagerComponent - project roots have changed
2018-02-04 12:39:19,762 [ thread 11]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 1ms; general responsiveness: ok; EDT responsiveness: ok
2018-02-04 12:39:19,772 [ thread 11]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 10ms; general responsiveness: ok; EDT responsiveness: ok
2018-02-04 12:39:21,760 [e-1024-b01]   INFO - pl.ProjectRootManagerComponent - project roots have changed
2018-02-04 12:39:21,772 [ thread 12]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 0ms; general responsiveness: ok; EDT responsiveness: ok
2018-02-04 12:39:21,776 [ thread 12]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 4ms; general responsiveness: ok; EDT responsiveness: ok

This also happens when there’s no tab with Flutter/Dart code.

Steps to Reproduce

  • Create new Flutter Project (in Android Studio 3.0, because of #1649);
  • open main.dart file
  • observe indexing

Version info

[✓] Flutter (on Mac OS X 10.13.3 17D47, locale en-PL, channel dev) • Flutter version 0.0.22 at /Users/wasyl/flutter • Framework revision 3001b3307d (5 days ago), 2018-01-30 11:37:15 -0800 • Engine revision 8f2d72b183 • Tools Dart version 2.0.0-dev.16.0 • Engine Dart version 2.0.0-edge.7af4db0ea091dddca6b2da851e6dda8d7f9467e8

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) • Android SDK at /Users/wasyl/Library/Android/sdk • Android NDK at /Users/wasyl/Library/Android/sdk/ndk-bundle • Platform android-27, build-tools 27.0.3 • ANDROID_HOME = /Users/wasyl/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[-] iOS toolchain - develop for iOS devices ✗ Xcode installation is incomplete; a full installation is necessary for iOS development. Download at: https://developer.apple.com/xcode/download/ Or install Xcode via the App Store. Once installed, run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer ✗ libimobiledevice and ideviceinstaller are not installed. To install, run: brew install --HEAD libimobiledevice brew install ideviceinstaller ✗ ios-deploy not installed. To install: brew install ios-deploy ✗ CocoaPods not installed. CocoaPods is used to retrieve the iOS platform side’s plugin code that responds to your plugin usage on the Dart side. Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS. For more info, see https://flutter.io/platform-plugins To install: brew install cocoapods pod setup

[✓] Android Studio • Android Studio at /Applications/Android Studio 3.2 Preview.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] Android Studio • Android Studio at /Applications/Android Studio 3.1 Preview.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] Android Studio (version 3.0) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[-] IntelliJ IDEA Community Edition (version 2017.3.3) ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.io/intellij-setup/#installing-the-plugins

[-] Connected devices • None

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:33 (7 by maintainers)

github_iconTop GitHub Comments

81reactions
JotaFerreiracommented, May 6, 2018

File -> Invalidate Cache/ Restart… works for me

46reactions
SeaRothcommented, Mar 28, 2018

@acidjazz dude instead of waiting for someone else to fix - find a way. Download an older version of Android Studio, do some searching on StackOverflow, follow the instructions above. The longer you wait for someone else to solve your problems the more miserable you will become. Become your own hero.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio got very slow and constantly "updating indices"
It has been working great until few weeks ago, and now it is so painfully slow. Most of the time it is "indexing/updating...
Read more >
Android Studio constantly indexing the project problem solution
To stop Android Studio from indexing the project every 2 seconds just close the project and from Studio's welcome screen import it :)....
Read more >
Why it's updating indices again and again? making it ...
IDE does a full project index only once. Then it index only changed/added files. It is needed to let IDEA know the structure...
Read more >
ScheduledExecutorService - Android Developers
scheduleAtFixedRate(beeper, 10, 10, SECONDS); Runnable canceller ... then initialDelay + period , then initialDelay + 2 * period , and so on.
Read more >
Crashes | Android Developers
A stack trace shows two pieces of information that are critical to debugging a crash: The type of exception thrown. The section of...
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