Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module names in Android Studio

I am trying to figure out the strange logic behind the modules naming in Android Studio.

See this screenshot from my project:

enter image description here

There is a lot of anomalies here:

  • Some modules are just bold and contain NO square brackets
  • Some modules are regular and do have the bold "other" name in square brackets
  • Some directories containing modules are bold even though these are NOT modules (just folders)
  • Some directories containing modules are regular and do have the bold "other" name in square brackets

The corresponding settings.gradle is like this:

rootProject.name='MbiSdkSampleApp'
include ':shared'
include ':backend:none'
include ':backend:mock'
include ':backend:nimbus'
include ':config:assets'
include ':config:mock'
include ':config:backend'
include ':resources:assets'
include ':resources:mock'
include ':resources:backend'
include ':user:backend'
include ':user:demo'
include ':fp:assets'
include ':fp:mock'
include ':fp:real'
include ':face:assets'
include ':app'

The names of physical directories are EXACTLY the same as the names of the includes above.

It is not any big issue as everything works normally (except of the ugly display), I just would like to understand what happens here...

Any ideas?

BTW: I am on the latest stable Android Studio, currently 4.0.

And yes, I went through the usual "fixing" of Android Studio issues by exercising hacks like "Invalidate Caches and Restart", etc.

Also: The other views (Project Files, Android) seem to be OK... I tend to conclude that this may be an Android Studio bug (one of sooo many I am experiencing all the time - UGHHH)...

like image 834
Jiří Křivánek Avatar asked Mar 18 '26 20:03

Jiří Křivánek


1 Answers

Android studio displays full module name in square brackets because there are multiple modules with the same name in your project (from your example: backend:mock, config:backend, etc..). Note that backend is considered a module in gradle even though there is no explicit :backend in your settings.gradle. Same applies for submodules *:mock, *:assets.

Bolding only module name is probably done to make it easier to differentiate between directory name and module name.

like image 189
Algimantas Avatar answered Mar 21 '26 00:03

Algimantas