10

Created a new Dynamic Feature Module: dynamic, build fails with the below exception: Execution failed for task ':dynamic:processDebugManifest'.

Expected configuration ':dynamic:debugCompileClasspath' to contain exactly one file, however, it contains no files.

Tried adding baseFeature true to the app gradle, and getting error:

Could not find method baseFeature() for arguments [true] on object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.

Gauri Gadkari
  • 237
  • 4
  • 12

2 Answers2

6

I solved this, you need to have all flavors of the base module in your dynamic feature module also

Gauri Gadkari
  • 237
  • 4
  • 12
  • 1
    Hello can you please elaborate this answer because I am facing the same issue – Rudraksh Shukla Jan 04 '20 at 10:28
  • 1
    your app gradle would have productFlavors, copy them over to your dynamic feature module's gradle. The flavors could be empty in the dynamic feature module's gradle. eg: productFlavors { google { } beta { } } – Gauri Gadkari Jan 13 '20 at 18:53
-2

I had the same error message but the problem was with the common KTS script I was using across the feature modules:

This was wrong:

private fun Project.configureDependencies() {
    dependencies.project(":app")
}

This was right:

private fun Project.configureDependencies() = dependencies{
    add("implementation", project(":app"))
}

Hope this helps some poor soul

shredder
  • 1,438
  • 13
  • 12