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

标签 android gradle

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

Plugin with id 'com.android.model.application' not found. Open File



也许我在配置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'

我不知道该怎么做才能解决此问题。我希望你能帮助我。

最佳答案

你需要改变这个

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


apply plugin: 'com.android.application'

关于android - 等级错误:找不到ID为 'com.android.model.application'的插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53113189/

相关文章:

android - ListView 中的复杂项目

android - 以编程方式更改主启动器 Activity

gradle - 如何创建带有两个值的gradle属性?

android - AAPT 错误 : resource drawable/. .. 未找到

java - 显示动画 GIF

android - setItemChecked(int 位置, bool 值)不起作用?

build - gradle 构建失败连接到 https ://repo1. maven.org 被拒绝

java - 我可以从 gradle 任务中保存 Eclipse 文件吗?

groovy - 在Gradle中运行测试之前,请在单独的线程中执行Java程序

rest - Gradle 脚本要在没有任何 3rd 方插件的情况下调用 REST Web 服务,有什么指示吗?