PC パソコン

How to Fix “Invocation of ‘Task.project’ by task ‘:DumpModelTask’ at execution time is unsupported”

With Gradle configuration caching enabled, android describe could fail because its DumpModelTask accessed Task.project during task execution. Google identifies this as a known Android CLI issue fixed in Android Studio Quail 1 Canary 3.

Representative error

Configuration cache problems found in this build.
Task ':DumpModelTask': invocation of 'Task.project' at execution time is unsupported.

Invocation of 'Task.project' by task ':DumpModelTask' at execution time is unsupported.

The task path and surrounding text may vary. The key identifiers are DumpModelTask, Task.project, and at execution time is unsupported.

Cause

According to Google Issue Tracker #504672140, the DumpModelTask registered by Android CLI’s android describe command accessed Task.project during task execution. Gradle configuration-cache requirements prohibit task actions from reaching into the Project model at execution time, so Gradle stops the operation.

If the diagnostic names DumpModelTask created by android describe, it matches this Android CLI defect. If it names another task, investigate that plugin or custom task separately.

Affected conditions and versions

  • You run Android CLI’s android describe.
  • Configuration caching is enabled through org.gradle.configuration-cache=true or an equivalent option.
  • The Android Studio/CLI build predates the fix.

Google’s fixed-issues page records the correction in Android Studio Quail 1 Canary 3 (2026.1.1 Canary 3), released April 30, 2026.

Recommended fix

  1. Check the installed build under Help > About.
  2. Use Help > Check for Updates and install Quail 1 Canary 3 or a newer stable release.
  3. Open a fresh terminal and verify that the android executable on PATH belongs to the updated installation.
  4. Run android describe again against the same project.
android describe --project_dir=/path/to/project

Alternative when an update is not immediately possible

As a temporary diagnostic measure, disabling configuration caching for this operation may allow it to complete.

android describe --project_dir=/path/to/project
# If necessary, temporarily disable
# org.gradle.configuration-cache=true in gradle.properties

Whether android describe accepts a direct Gradle option depends on the CLI version. If you edit gradle.properties, record the original value and restore it afterward. Treat this only as a temporary workaround; updating to the fixed build is preferred.

How to verify the fix

  • android describe exits with code 0.
  • No configuration-cache violation mentions DumpModelTask.
  • The command reports paths to JSON metadata for build targets and artifacts.
  • The command still succeeds after configuration caching is re-enabled.

Cautions

An older Android CLI earlier on PATH can keep reproducing the bug after Android Studio is updated. Also, if the error identifies a different task, that task or its plugin may still access the Project API at execution time and requires a separate fix.

Summary

Invocation of 'Task.project' ... at execution time is unsupported for DumpModelTask is a known configuration-cache compatibility defect in Android CLI. Update to Quail 1 Canary 3 or later and rerun the command using the updated android executable.

Official references