等级错误:找不到ID为'com.android.model.application'的插件

时间:2018-11-02 05:39:40

标签: android gradle

两年后,我需要更新一个应用程序。但是在构建之后我得到了以下消息:

  

未找到ID为'com.android.model.application'的插件。   打开文件

也许我对gradle的配置做错了。

这是我的文件:

apply plugin: 'com.android.model.application'

model {
    android {
        compileSdkVersion = 28
        buildToolsVersion '28.0.3'

        defaultConfig.with {
            applicationId = "com.xxx.xxxxx"
            minSdkVersion.apiLevel = 15
            targetSdkVersion.apiLevel = 28
            versionCode = 13
            versionName = "2.1.2"
            multiDexEnabled = true
            vectorDrawables.useSupportLibrary = true
        }
    }

    android.dexOptions {
        javaMaxHeapSize "4G"
    }

    android.buildTypes {
        release {
            minifyEnabled = false
            proguardFiles.add(file('proguard-android.txt'))
        }
    }
    android.ndk {
        moduleName = "obfuscation-android-jni"
        platformVersion = "15"
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    testCompile 'junit:junit:4.12'
    implementation ('com.github.ozodrukh:CircularReveal:2.0.1@aar')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.getbase:floatingactionbutton:1.10.1'
    implementation 'com.github.coyarzun89:fabtransitionactivity:0.1.1'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
    implementation 'com.google.firebase:firebase-analytics:16.0.4'
    implementation 'com.google.android.gms:play-services:12.0.1'
}
apply plugin: 'com.google.gms.google-services'

我不知道该如何解决。我希望你能帮助我。

1 个答案:

答案 0 :(得分:1)

您需要更改

apply plugin: 'com.android.model.application'

apply plugin: 'com.android.application'