I found this article that helps me with my app:
In my case, I had to increase different versions...
Android Studio Narwhal 3 Feature Drop | 2025.1.3
ndkVersion = "27.0.12077973" (build.gradle.kts)
id("com.android.application") version "8.11.0" apply false (settings.gradle.kts)
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip (gradle-wrapper.properties)
org.gradle.jvmargs=-Xmx4096m (gradle.properties)
The version upgrade of AGP and its add-on has been done following the Android documentation table below:
https://developer.android.com/build/releases/gradle-plugin?hl=es-419