关于Material Components Catalog应用位置及使用问题的技术咨询
How to Locate and Run the MDC Catalog Module for Android
Hey there, let's work through this problem together—here's what you need to know:
1. First, Grab the Correct Android MDC Repository
You mentioned not finding the Android catalog app on GitHub, but it’s actually bundled with the official Material Components for Android repository. You’ll need to clone this repo first to access the catalog module.
2. Finding the Catalog Module in Android Studio
Once you’ve cloned the repo:
- Open the root folder of the cloned repository in Android Studio.
- Switch from the default Android view to the Project view (use the dropdown at the top-left corner of the project panel).
- You’ll spot the
catalogmodule listed alongside other modules likematerialorelevationright in the project structure.
3. Running the Gradle Command
The ./gradlew :catalog:installDebug command needs to be run from the root directory of the repository (the same folder that contains the gradlew file). Here’s how to do it:
- Option 1: Use Android Studio’s built-in Terminal (found at the bottom of the window). It should default to the repo root if you opened the project correctly, but double-check the working directory if needed.
- Option 2: Use your system’s terminal/command prompt, navigate to the repo root folder, then execute the command.
- Note: If you’re on Windows, use
gradlew :catalog:installDebug(skip the./prefix).
- Note: If you’re on Windows, use
Quick Tips
- Make sure you have an Android device connected (with USB debugging turned on) or an emulator running before running the install command.
- If Android Studio doesn’t recognize the module right away, try syncing the project with Gradle files (click the sync icon in the toolbar).
内容的提问来源于stack exchange,提问作者Rich Morey
相关产品推荐
相关产品推荐

