android - 生成gradle中的错误错误:否这样的属性:类GradleVersion:JetGradlePlugin

标签 android android-studio gradle build

我无法建立gradle。它显示如下错误:
错误:无此类属性:类GradleVersion:JetGradlePlugin
我的 Gradle 是

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
        classpath 'com.google.gms:google-services:4.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://maven.google.com" // Google's Maven repository

        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

最佳答案

您需要使用3.3.2稳定版本更新gradle,然后转到项目设置并将5.1.0更改为4.10.0

关于android - 生成gradle中的错误错误:否这样的属性:类GradleVersion:JetGradlePlugin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56035537/

相关文章:

android - 新的 Jetpack 分页库使应用程序崩溃 - 新

android - 在所有库中导入应用程序兼容性依赖项

android - 在Android Studio 2.3.3中添加字体

android - 向进度对话框添加延迟

android - Phonegap 构建 android - 错误 "Adding the android platform"ENOENT

android - 如何配置gradle从 Assets 目录中删除未使用的字体?

android - 如何使用Android Studio在Android L或4.4上运行应用程序?

android - Volley 不适用于 Gradle 2.0 和 Instant run

android - Gradle接连执行任务

java - 如何在 MainActivity 和 Fragment 中正确获取 WifiManager 的实例