Andriod Studio添加依赖的时候报错

Error:(16, 0) Gradle DSL method not found: 'compile()'
Possible causes:<ul><li>The project 'testAPP' 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).
<a href="fixGradleElements">Upgrade plugin to version 2.3.0 and sync project</a></li><li>The project '表情猫' may be using a version of Gradle that does not contain the method.
<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 (Module: app)
添加

compile 'com.github.hackware1993:MagicIndicator:1.5.0'
After adding those lines to:

而不是

build.gradle (Project: app)```



![Paste_Image.png](http://upload-images.jianshu.io/upload_images/2704327-120b8d7224460f87.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)



![Paste_Image.png](http://upload-images.jianshu.io/upload_images/2704327-a663ea9fb02c16ce.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 176,600评论 25 709
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,183评论 19 139
  • 不怕跌倒,所以飞翔 组件化开发 参考资源 Android组件化方案 为什么要组件化开发 解决问题 实际业务变化非常...
    笔墨Android阅读 8,131评论 0 0
  • 参考 中文官网构建指南:https://developer.android.google.cn/studio/bu...
    FinalSky阅读 10,848评论 0 16
  • 时间过得好快,快到不知不觉已经毕业已经一年半;时间又过得好慢,慢到我几乎每天被记忆折磨。 就这样,在这个满城都是浪...
    孙小柒阅读 3,153评论 0 2

友情链接更多精彩内容