Reputation: 21
FAILURE: Build failed with an exception.
Where: Build file 'D:\Android_Projects\firebase_app\android\app\build.gradle' line: 29
What went wrong: A problem occurred evaluating project ':app'.
No signature of method: build_5iejyyz13fbsvjeidpc5udm23.android() is applicable for argument types: (build_5iejyyz13fbsvjeidpc5udm23$_run_closure2) values: [build_5iejyyz13fbsvjeidpc5udm23$_run_closure2@38474cef]
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 Exception("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.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
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 flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
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.google.firebase:firebase-analytics-ktx'
implementation platform('com.google.firebase:firebase-bom:30.0.2')
implementation 'com.android.support:multidex:1.0.3'
}
Upvotes: 1
Views: 18394
Reputation: 1
**No signature of method: build_5fhogbatv7ydk09vp9xh7fztg.android() is applicable for**
First we need to remove all gradle code and copy other runinig project gradle and past here and change package name and all stuff accroding to you.
Clean and Rebuild project and Run.
Build successfully. and working fine.
Upvotes: 0
Reputation: 1
Try the setting:
minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
Upvotes: 0
Reputation: 97
This error always comes when your gradle file has an error like a typo or colon or anything that is inappropiate... Your error says line 29, thats where the android tag beggins, please check anything that is incorrect typed in the android tag. Try to compare it with another working project gradle file.
Upvotes: 5
Reputation: 1
I had changed the MinSdkVersion to 21 and the CompileSdkVersion to 31 and it worked for me. Try these out and if the error persists inform.
Upvotes: 0