How to Fix Error: No Signature of Method: Build_Ap86Oam3Dut3Pxce3X49Rdtma.Android()

Android Studio throws No signature of method error, pointing to build.gradle:app

Try to structure the code like this

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.example.bitfighter"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures {
viewBinding = true
}

The defaultConfig should always only be in the android clause and not inside the buildFeatures. Other than that, you don't need a buildReleases clause when you already have added a buildFeatures clause.

No signature of method: build_79k99zzpu1czozbhubqf5bc4h.android() is applicable for argument types: (build_79k99zzpu1czozbhubqf5bc4h$_run_closure1)

I solved by writing:

buildFeatures {
dataBinding true
}

instead of:

dataBiding{
enabled = true
}


Related Topics



Leave a reply



Submit