I do have a multi-module project with a library project in a different root path. As illustration you can imagine something like this:
project(':libA').projectDir = new File("$System.env.LIB_ROOT", '/libraries/libA')
Gradle 'app' project refresh failed:
Configuration with name 'default' not found.
* What went wrong:
A problem occurred configuring project ':app'.
> Configuration with name 'default' not found.
Android Studio doesn't read environment variables, so this approach won't work. Also, using the
projectDir scheme in settings.gradle will probably cause problems. Android Studio has a limitation that all of its modules need to be located underneath the project root. If you have libraries that are used in multiple projects and they can't be placed under a single project root, the best advice is to have them publish JARs or AARs to a local Maven repository that individual projects can pick up.