BUILD FAILED in 3s error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'EMTS'. > compileSdkVersion is not specified. Please add it to build.gradle * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at . BUILD FAILED in 3s. info Run CLI with --verbose flag for more details.
i just set firebase google services.json file but it give error i checked everything all things are absolutly fine
BUILD FAILED in 3s error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'EMTS'. > compileSdkVersion is not specified. Please add it to build.gradle * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.. BUILD FAILED in 3s. info Run CLI with --verbose flag for more details.
i just set firebase google services.json file but it give error i checked everything all things are absolutly fine
Share Improve this question asked Feb 2 at 16:03 Hussnain BukhariHussnain Bukhari 12 Answers
Reset to default 1As mentioned in your error log, you need to add compileSdkVersion in your app/build.gradle file. Do something like
ext {
compileSdkVersion = 33 // this can change based on your react native version
}
you need to add compileSdkVersion in your android -> build.gradle
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
compileSdkVersion = 34 //this needs to be addeed
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
kotlinVersion = "1.8.0"
}