I have a large project folder that contains many sub projects. Only 4 are part of the Android project, the rest are C code.
However, it appears that Android Studio is indexing ALL of it, which takes a long time.
How do I exclude these other directories from indexing?
There no way to explicitly do it, and the Module Settings only lists the Android projects so I cannot remove the other folders from there.
android.arch.persistence.room.Index. Declares an index on an Entity. see: SQLite Index Documentation. Adding an index usually speeds up your select queries but will slow down other queries like insert or update. You should be careful when adding indices to ensure that this additional cost is worth the gain.
Excluded
and hit enter.Careful, I haven't been able to find a way to 're-include' folders back yet.
Use the 'idea'
plugin to exclude directories. For some reason, it seems the idea
configuration is ignored if a subproject is configuring it (and will always exclude the project.buildDir
and .gradle
folders), but it works if you tell the root project which directories to exclude:
In your root project build.gradle
file, do
apply plugin: 'idea'
idea {
module {
excludeDirs.add(file('path/to/subproject'))
excludeDirs.add(file('path/to/othersubproject'))
}
}
After syncing, you'll notice that the root projects .iml
file contains corresponding <excludeFolder>
tags, and that Android Studio no longer indexes the directories.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With