android - 如何修复 > 方法 : build_dxc6m5s863o0nfrfjdg2bqjp. android() 没有签名适用于参数类型

标签 android

问题:评估项目“:app”时出现问题。

No signature of method: build_dxc6m5s863o0nfrfjdg2bqjp.android() is applicable for argument types: (build_dxc6m5s863o0nfrfjdg2bqjp$_run_closure1) values: [build_dxc6m5s863o0nfrfjdg2bqjp$_run_closure1@18112963]


Gradle 文件:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.numix.calculator_pro"

        testApplicationId "com.numix.calculator_pro_pro.pro.tests"
        testInstrumentationRunner "android.test.InstrumentationTestRunner"
    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    implementation 'com.android.support:support-v4:21.0.3'
    compile files('libs/achartengine.jar')
    compile files('libs/ejml-0.21.jar')
    compile files('libs/arity-2.1.6.jar')
    compile files('libs/slider.jar')
    compile files('libs/acra-4.5.0-sources.jar')
    compile files('libs/acra-4.5.0-javadoc.jar')
}

最佳答案

检查 build.gradle 中是否存在 versionCode 变量,它是整数,而不是字符串:

defaultConfig {
    //....
    versionCode 15
    versionName "1.15"
}

关于android - 如何修复 > 方法 : build_dxc6m5s863o0nfrfjdg2bqjp. android() 没有签名适用于参数类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65448284/

相关文章:

android imageview在 map 上的位置

java - Android 中的 ISO8601 日期字符串转为 Long

安卓 : Capture a document & Scan it using camera

android - 可扩展的 ListView 在 android 操作系统中非常慢

android - Kotlin 类转换异常

android - 为什么无法在 android 的语音通话中播放音频文件

android - 巨大的 HttpPost 响应 : JSON

java - 如何隐藏/删除/避免系统应用程序(非 UI)在 Android 应用程序抽屉中列出/显示?

java - 仅当不直接扩展 RecyclerView 时才会出现 InflateException

android - 摆脱 Activity 顶部的渐变(Android)