12

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)...

1
  • 1
    rootProject.name='MbiSdkSampleApp' remove this may be solve it
    – Meet
    Commented Nov 3, 2023 at 12:06

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.