In build.gradle (app), change
implementation 'androidx.appcompat:appcompat:1.7.1'
to
implementation 'androidx.appcompat:appcompat:1.6.1'
Run the app.
If successful, change it back to