I just updated the android studio to the latest version today and I figured out that there is no "Rebuild Project" option in the "Build" tab.
Android Studio version: Android Studio Meerkat Feature Drop | 2024.3.2 Patch 1
I have tried to use the default build process when running app, but it seems like it doesn't work.
Clean and Assemble Project with Tests is what you are looking for.
Since Rebuild is not a well-defined term, the new terminology is more precise and explicitly names the Gradle tasks that are actually executed. In a common Android project that would result in the execution of the following tasks:
[:app:clean, :app:assembleDebug, :app:assembleDebugUnitTest, :app:assembleDebugAndroidTest]