解决引入Dragger2时的等注入依赖报的错: Gradle DSL method not found: 'apt()'
来源:互联网 发布:java读取xml文件内容 编辑:程序博客网 时间:2024/06/07 05:47
今天创建项目的时候发现引用了Dragger2的 apt 插件后,项目突然给我报了这么一个错误。如下:
Error:(27, 0) Gradle DSL method not found: 'apt()'
Possible causes:<ul><li>The project 'TransactionTest' may be using a version of Gradle that does not contain themethod.
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
经过我仔细观察后,发现是我主工程下的build.gradle文件中没有引用 Android-gralde.apt的插件。
解决方案:
在模块的build.gradle文件的
apply plugin: 'com.android.application'下面添加下面这句话:
apply plugin: 'android-apt'
在根目录的build.gradle的dependencies(依赖)下添加一句:
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
阅读全文
0 0
- 解决引入Dragger2时的等注入依赖报的错: Gradle DSL method not found: 'apt()'
- 解决: Gradle DSL method not found: 'apt()'
- AndroidStudio:解决Gradle DSL method not found: 'runProguard()' 的问题
- 解决Gradle DSL method not found: 'compile()'错误的方法
- Gradle DSL method not found: 'apt()'
- 关于Android studio出现Error:(44, 0) Gradle DSL method not found: 'apt()' 错误的解决办法
- 导入项目 报错 Gradle DSL method not found: 'android()
- Android Studio报错 Gradle DSL method not found: 'apply()'
- Android Studio报错:Gradle DSL method not found: 'android()'
- android studio 报错: Gradle DSL method not found: 'Android()'
- 解决gradle DSL method not found: android()
- 解决Gradle DSL method not found: ‘android()’
- 解决 Gradle DSL method not found: 'android()'
- 解决Gradle DSL method not found :'android()'
- 解决Gradle DSL method not found: ‘android()’
- 解决Gradle DSL method not found: ‘android()’
- 解决Gradle DSL method not found: ‘android()’
- 解决Gradle DSL method not found: ‘android()’
- PHP函数stream_context_create()模拟POST/GET
- HDU-Kanade's sum-模拟
- 分享一款Android开源的仿IOS滚轮效果的控件
- HDU 6121 思维 + DFS
- nyoj 18 The Triangle
- 解决引入Dragger2时的等注入依赖报的错: Gradle DSL method not found: 'apt()'
- ClippingNode
- 20170816——Yi+图像算法实习生
- 关于JVM和(堆和栈的区别)
- 文章标题 POJ 3281 : Dining (最大流+巧妙建图)
- Ubuntu 14.04 上使用 Nginx 部署 Laravel
- 使用hadoop对一组数据排序,求平均值。
- Python中的逗号作用
- Akka(17): Stream:数据流基础组件-Source,Flow,Sink简介