0

I'm making an app with Firebase in android studio with flutter, but I got this issue on android studio with flutter on the terminal:

  • I delete the line 28, don't fix it, upgrade android SDK as well, and still throws me this error:

    FAILURE: Build failed with an exception.

      * Where:
      Build file 'C:\Users\rodri\AndroidStudioProjects\firebase_app\android\app\build.gradle' line: 28
    
      * What went wrong:
      A problem occurred evaluating project ':app'.
      > No signature of method: build_cfrixyjg4kz0lcy8fplw80i25.android() is applicable for argument types: (build_cfrixyjg4kz0lcy8fplw80i25$_run_closure2) values: [build_cfrixyjg4kz0lcy8fplw80i25$_run_closure2@3d71da18]
    
      * 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.org
    
      BUILD FAILED in 1s
      Exception: Gradle task assembleDebug failed with exit code 1
    

This is my app\build.gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 32

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.getx.app.db.firebaseApp"
        // You can update the following values to match your application needs.
        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
        minSdkVersion 16
        targetSdkVersion 32
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        MultiDexEnable true
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:multidex:1.0.3'
}

So, in that case how can I solve this problem, thank you in advance

lomipac
  • 65
  • 1
  • 4
  • some ref: https://stackoverflow.com/questions/61807520/how-to-fix-error-no-signature-of-method-build-ap86oam3dut3pxce3x49rdtma-androi – CbL May 20 '22 at 14:31

0 Answers0