奇妙なGradleエラー 設定(...)にちょうど1つのファイルが含まれていると予想されましたが、ファイルが含まれていません 質問する

奇妙なGradleエラー 設定(...)にちょうど1つのファイルが含まれていると予想されましたが、ファイルが含まれていません 質問する

シンプルなインスタント アプリを開発しようとしています。すべてのモジュールと構成を完了しましたが、インスタント アプリを実行しようとすると、Gradle コンソールに次のエラーが表示されます。

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

この問題を解決する方法を知っている人はいますか?

ベストアンサー1

基本機能の defaultConfig に「baseFeature true」が設定されていることを確認します。

ベースがなく、機能が 1 つしかない場合は、その機能に baseFeature true を設定します。

以前のバージョンでは、名前のない機能がベースでしたが、現在は明示的にマークする必要があります。

おすすめ記事