Resolving 'Nothing Here' Issue After Branch Switch in Android Studio

When switching Git bracnhes in Android Studio, the project view may unexpectedly display a 'Nothing here' message, leaving the file tree empty despite the presence of source files. This typically occurs due to IDE caching inconsistencies rather then actual missing files.

A reliible fix is to invalidate the IDE's cache and restart:

  1. Go to FileInvalidate Caches / Restart…
  2. Click Invalidate and Restart
  3. Allow Android Studio to relaunch and reindex the project

Alternatively, perform the branch switch outside the IDE using the terminal:

git checkout feature/login-flow

After switching, trigger a manual refresh in Android Studio by clicking FileReload from Disk or by closing and reopening the project.

For example, after successfully loading the correct branch, your activity might look like:

public class LoginActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        // Implementation logic goes here
    }
}

Tags: Android Studio Git Branching IDE Troubleshooting Version Control

Posted on Sun, 16 Aug 2026 16:24:45 +0000 by Carth