0

I'm trying to develop an Android app with multi modules.

I have created my project, it was working fine until I try to create a module.

I have this:

{AppName}
|--> app (contains the main activity,...)
|--> {moduleName}
|----> ui (contains some UI stuff)

On IDE side it seems to works fine
In settings.gradle I've this:

include(":{moduleName}:ui")

In build.gradle (in App folder), I've this:

implementaion(project(":{moduleName}:ui"))

Inside my app, I use some dependency in screens which seems to load well (no red underline)
But, when I try to build my app, each references is unresolved:

e: file:///{AppName}/app/src/main/kotlin/.../***.kt:6:20 Unresolved reference: ***
e: file:///{AppName}/app/src/main/kotlin/.../***.kt:20:9 Unresolved reference: ***

I don't know what to do to retrieve these dependencies...

Do you have any idea?

I've try to add:

project(":{moduleName}:ui").projectDir = File(rootDir, "/{moduleName}/ui")

Inside settings.gradle but when I try to sync, I have this error: Could not find method File() for arguments [{rootDir}, /{moduleName}/ui] on settings '{appName}' of type org.gradle.initialization.DefaultSettings.

Thanks for your help!

JohnDoe
  • 83
  • 1
  • 6

0 Answers0