找不到Gradle DSL方法:"kapt()" [英] Gradle DSL method not found: 'kapt()'

查看:567
本文介绍了找不到Gradle DSL方法:"kapt()"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找不到等级DSL方法:"kapt()" 可能的原因: 项目'jetpacklearn'可能正在使用不包含该方法的Android Gradle插件版本(例如,在1.1.0中添加了'testCompile'). 将插件升级到版本3.4.0并同步项目

Gradle DSL method not found: 'kapt()' Possible causes: The project 'jetpacklearn' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 3.4.0 and sync project

项目"jetpacklearn"可能正在使用不包含该方法的Gradle版本. 打开Gradle包装器文件

The project 'jetpacklearn' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file

我的gradleVersion为'3.4.0',但无法处理,请问同样的问题

My gradleVersion is '3.4.0', but can not deal with it , ask me the same question

    classpath "com.android.tools.build:gradle:$gradleVersion"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"

推荐答案

检查您的应用程序build.gradle中是否包含此内容?

Check if you have this in top of your app build.gradle?

apply plugin: 'kotlin-kapt'

这篇关于找不到Gradle DSL方法:"kapt()"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆