If someone comes across this in 2025, then here is the solution https://developer.android.com/studio/known-issues#run-config-missing-gradle