compileSdkVersion is not specified. Please add it to build.gradle after upgrading flutter 3.19.0

153 Views Asked by At

After upgrading Flutter version ``3.19.0 getting this error I'm stuck 8 hour in this issue but not resolve anybody can tell me how to fix it?

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'android'.

com.android.builder.errors.EvalIssueException: 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.

BUILD FAILED in 1s Error: Gradle task assembleDebug failed with exit code 1

I'm trying from compileSdk 33 to compileSdkVersion 33 and adding plugins id "com.android.application" top of app/build.gradle file

plugins {
    id "com.android.application"
    id "kotlin-android"
    id "dev.flutter.flutter-gradle-plugin"
}
1

There are 1 best solutions below

0
AndroDevs On

CompileSdkVersion is deprecated, please use the new compileSdk instead.

android {
   namespace "your.package.name"
   compileSdk flutter.compileSdkVersion (or any SDK like 33 or 34)