最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

firebase - IM facing To run my native project it give gradle error on Sdk version - Stack Overflow

programmeradmin0浏览0评论

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 1
Add a comment  | 

2 Answers 2

Reset to default 1

As 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"
    }
发布评论

评论列表(0)

  1. 暂无评论