Android Studio 3.0.1升级后Git检出项目无运行配置器问题求助
Hey there! Let's figure out why your run configurations vanished when pulling the project on another computer.
Android Studio stores your run/debug setups in the .idea/runConfigurations folder at your project's root. The issue here is almost certainly that this folder wasn't being tracked by Git. Even though you never edited .gitignore yourself, it’s possible the default .gitignore template changed slightly in Android Studio 3.0.1, which started excluding this directory by default—so it never got pushed to your GitLab/BitBucket repo.
Since you rely on Android Studio’s Git integration, here’s how to fix this using the IDE:
Check your .gitignore file
Open your project’s root.gitignorefile in Android Studio. Look for a line like/.idea/runConfigurations/orrunConfigurations/. If you spot it, that’s exactly why the folder didn’t sync to your remote repo.Update .gitignore to track run configurations
Either delete that line entirely, or comment it out by adding a#at the start, like this:#/.idea/runConfigurations/This tells Git to stop ignoring the run configurations folder.
Add the run configurations folder to Git
- Switch to the Version Control tab (bottom left corner of Android Studio).
- Expand the
.ideafolder, findrunConfigurations, right-click it, and select Add to VCS. - Write a simple commit message (e.g., "Track project run configurations") and click Commit → then push the changes to your remote repo.
Sync the other computer
On your second computer, pull the latest changes from your GitLab/BitBucket repo. Once you open the project in Android Studio, your run configurations should be back under the Run menu!
Project-specific settings like run configurations should always be tracked in Git to keep consistency across devices. Android Studio’s default .gitignore is designed to exclude user-specific preferences (like window layouts), but project-wide setups like run configs belong in the repo.
内容的提问来源于stack exchange,提问作者francesco freddi

