在Android项目中使用'compileOnly'范围? [英] Use of the 'compileOnly' scope in Android projects?

查看:190
本文介绍了在Android项目中使用'compileOnly'范围?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用Gradle 2.12(或更新版本)和适当版本的Android Gradle插件。 Gradle 2.12引入了 compileOnly 配置,所以当我尝试使用它时,为什么会出现错误?

I'm using Gradle 2.12 (or newer) with an appropriate version of the Android Gradle plugin in my project. Gradle 2.12 introduced the compileOnly configuration, so why do I get an error when I try to use it?


无法为参数找到方法compileOnly()

Could not find method compileOnly() for arguments


推荐答案

提供而不是 compileOnly

请参阅 https://github.com/google/auto/issues/324#issuecomment-212333044

这篇关于在Android项目中使用'compileOnly'范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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