Skip to content

Gradle Tool Window Tasks Not Showing in Android Studio

Problem

Starting with Android Studio 4.2, many developers noticed that Gradle tasks were no longer visible in the Gradle tool window. Instead of seeing the complete list of available tasks (such as build, assemble, test, etc.), users only saw dependencies, making it difficult to execute Gradle tasks through the IDE's graphical interface.

This change was initially confusing because previous versions (like 4.1.3) displayed all Gradle tasks by default. The behavior seemed like a bug, but it was actually an intentional performance optimization implemented by Google.

Root Cause

Google intentionally disabled the automatic building of Gradle task lists during sync in Android Studio 4.2. This change was made because:

  • Gradle task lists can be very large in complex Android projects
  • Generating the complete task list significantly impacts Gradle sync performance
  • Most developers only use a small subset of available tasks regularly

The setting was moved to the Experimental section of Android Studio's preferences, where it's disabled by default for performance reasons.

Solutions

The most straightforward solution is to enable the task list generation in Android Studio's settings:

  1. Open Settings (or Preferences on macOS)

  2. Navigate to Experimental (may be under Build, Execution, DeploymentGradle in some versions)

  3. Find and adjust the Gradle task configuration setting:

    Version Differences

    The setting behavior changed across Android Studio versions:

    • Android Studio 4.2 to Electric Eel (2022.1.1): Uncheck "Do not build Gradle task list during Gradle sync"
    • Android Studio Giraffe (2022.3.1) and later: Check "Configure all Gradle tasks during Gradle Sync"
  4. Click Apply or OK

  5. Sync your project with Gradle files: File → Sync Project with Gradle Files

  6. If tasks still don't appear, restart Android Studio

View Screenshot Examples

Android Studio 4.2 SettingUncheck this option in Android Studio 4.2 to Electric Eel

Android Studio Giraffe SettingCheck this option in Android Studio Giraffe and later

Method 2: Use Terminal Commands

If you prefer command-line tools or want to avoid the performance impact of generating all tasks:

bash
# List all available tasks
./gradlew tasks --all

# Execute a specific task
./gradlew <taskname>

# Example: Build the project
./gradlew build

# Example: Run tests
./gradlew test

Method 3: Create Run Configurations

For frequently used tasks, create custom run configurations:

  1. Go to Run → Edit Configurations
  2. Click the + button and select Gradle
  3. Choose your module
  4. Enter the task name
  5. Save the configuration

You can then run these tasks directly from the run configuration dropdown.

Performance Considerations

TIP

For large projects, consider keeping the default setting (not generating all tasks) for better performance. The terminal method or custom run configurations provide efficient alternatives without slowing down your Gradle sync.

The performance impact of generating all Gradle tasks can be significant in projects with:

  • Multiple modules
  • Complex build logic
  • Many custom tasks
  • Large plugin ecosystems

Current Status

As of Android Studio Koala (2024.1.2), the setting remains available in Settings → Experimental → Configure all Gradle tasks during Gradle Sync. The interface may continue to evolve, but the underlying functionality remains consistent.

Conclusion

The missing Gradle tasks in Android Studio 4.2+ is not a bug but a performance optimization. You can restore the task list through the Experimental settings, use terminal commands for specific tasks, or create custom run configurations for frequently used tasks.

Choose the method that best balances your need for task visibility with your project's performance requirements. For most developers, using terminal commands for occasional tasks while keeping the setting disabled provides the best balance of functionality and performance.