Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix ERROR: No signature of method: build_ap86oam3dut3pxce3x49rdtma.android()?

ERROR: No signature of method: build_ap86oam3dut3pxce3x49rdtma.android() is applicable for argument types: (build_ap86oam3dut3pxce3x49rdtma$_run_closure1) values: [build_ap86oam3dut3pxce3x49rdtma$_run_closure1@47588b04]

The build gradle is:

apply plugin: 'com.android.application'

    android{
    implementationSdkVersion 28
    buildToolsVersion "29.0.3"
    defaultConfig {
        applicationId "com.uiresource.taksiku"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        }
    }

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        androidTestImplementation('com.android.support.test.espresso:espresso-core:2.3-alpha', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        implementation "com.android.support:appcompat-v7:$var"
        implementation 'com.android.support:design:28.0.0'
        testimplementation 'junit:junit:4.13'
        implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta5'
        implementation 'de.hdodenhof:circleimageview:3.1.0'
        }
like image 807
Usman Liaqat Avatar asked May 14 '20 21:05

Usman Liaqat


Video Answer


4 Answers

If you are using kotlin version 1.4.21 or newer, kotlin-android-extension is deprecated. So if you removing the plugin you also have to remove the android experimental extension block. In my case, I had to remove these pieces of code.

apply plugin: 'kotlin-android-extensions'


androidExtensions {
    experimental = true
}

But if above did not fix it

This a kind of general and/or wrapping error which hides the real cause and/or problem, hence to see actual error message, try something like:

./gradlew :app:assembleDebug --stacktrace

And search for resulting real error-message instead.

like image 194
Chintan Parmar Avatar answered Oct 10 '22 15:10

Chintan Parmar


I had the same error message until I commented out everything in the android plugin except the compile sdk version, trying to get back to a successful build config.

android {
    compileSdkVersion 23
/*
    ...
*/
}

Then, I started uncommenting things until I narrowed the problem down to using the following incorrectly.

ProductFlavors {
  ...
}

I'm not sure if you're using the same block, but at the moment, I'm leaving it commented out because I'm not sure it's needed. Once I got rid of it though, I was receiving other errors about sdk root dir location, so I was able to fix those.

I hope this helps!

like image 38
Daniel Avatar answered Oct 10 '22 16:10

Daniel


I was getting a similar error because the versionCode was being taken from a properties file, but the versionCode needs to be an integer and not a string, so toInteger() was needed.

Nice logs, android.

like image 23
htafoya Avatar answered Oct 10 '22 17:10

htafoya


in my case I needed to comment out this lines in gradle

androidExtensions{
    experimental = true
}
like image 16
mahmood Avatar answered Oct 10 '22 15:10

mahmood