Strange gradle error Expected configuration (...) to contain exactly one file, however, it contains no files

Skye picture Skye · Aug 23, 2017 · Viewed 7.7k times · Source

I'm trying to develop simple instant app. I've done all modules and configurations, but when I'm trying to run instant up, gradle console show's me below error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':blogspace-instant:packageDebugInstantAppBundle'.
> Expected configuration ':blogspace-instant:debugCompileClasspath' to contain exactly one file, however, it contains no files.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

Does anyone know how to solve this problem?

Answer

HaMMeReD picture HaMMeReD · Aug 26, 2017

Make sure you have "baseFeature true" in the base feature defaultConfig.

If you have no base and only one feature, put baseFeature true in your one feature.

In older versions the feature without a name was the base, but now you need to explitly mark one.