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

后端 未结 15 2104
野的像风
野的像风 2021-02-12 11:27

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

相关标签:
15条回答
  • 2021-02-12 11:36

    I had this exact same issue. It is a nasty one.

    I followed the answer first here Deprecated Gradle features not compatible and ran in the terminal cd android && ./gradlew clean && ./gradlew :app:bundleRelease

    the gradlew command gave more detialed feedback, and turned out my Java and JDK were 32bit instead of 64 and also outdated...

    This resulted in further errors, but could resolve them step by step: Invalid initial heap size -Xms4096M Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_151 contains a valid JDK installation

    0 讨论(0)
  • 2021-02-12 11:36

    In my case, the error cause is below

    compilpepeeSdkVersion

    rather than

    compileSdkVersion

    0 讨论(0)
  • 2021-02-12 11:41

    It is because there's syntax error in android{..} part of build.gradle You've used implementationSdkVersion which should ideally be compileSdkVersion. Error in variable names in android{..} leads to such errors.

    TLDR;

    Replace implementationSdkVersion with compileSdkVersion

    0 讨论(0)
  • 2021-02-12 11:42

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

    androidExtensions{
        experimental = true
    }
    
    0 讨论(0)
  • 2021-02-12 11:48

    Try to comment this in your app level build.gradle file

    openOptions {
        disable 'InvalidPackage'
    }
    
    0 讨论(0)
  • 2021-02-12 11:49

    Thanks for mentioning to just comment things and test, for me it was:

    kapt {
        useBuildCache = true
    }
    

    Removed it, everything was building again. Happened after updating Kotlin version.

    0 讨论(0)
提交回复
热议问题