Gradle DSL method not found: 'android()
2016-03-31 22:19
405 查看
原文错误提示:
Error:(16, 0) Gradle DSL method not found: 'android()'
Possible causes:<ul><li>The project ‘XXXXXXX' 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>
错误原因:
android studio 引进项目时,自动查找本机是否有项目设置的SDK版本,若发现没有,我们会在project structure修改成自己的SDK。然而,修改后,AS会自动在项目下的build.gradle里添加上以下代码:
解决办法:
删除以上图片中红框中的代码,然后再执行build->Rebuild project,删除完之后的代码如下:
Error:(16, 0) Gradle DSL method not found: 'android()'
Possible causes:<ul><li>The project ‘XXXXXXX' 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>
错误原因:
android studio 引进项目时,自动查找本机是否有项目设置的SDK版本,若发现没有,我们会在project structure修改成自己的SDK。然而,修改后,AS会自动在项目下的build.gradle里添加上以下代码:
解决办法:
删除以上图片中红框中的代码,然后再执行build->Rebuild project,删除完之后的代码如下:
相关文章推荐
- Android Studio提交代码到SVN
- Android坐标系
- [android] 代码注册广播接收者&利用广播调用服务的方法
- Intent 全面理解
- Android学习之设计模式之单例模式
- Android 的 SDK Manager 无法启动 闪退解决方法
- 解决Attribute "rippleColor" has already been defined的问题
- android 文字描边
- Android知识总结:ListView 出现IndexOutOfBoundsException异常
- 聊聊Android 热修复Nuwa有哪些坑
- Android学习启动篇——itxiebo
- android 视频 播放 (VideoView的小实例)
- Android StateMachine 学习笔记
- Ubuntu 12.4 配置android开发环境(转载)
- Android用Websocket实现聊天室
- [android] 采用aidl绑定远程服务
- android 属性android:visibility及 view的setVisibility方法值的意思
- Android获取新收到的短信内容
- Windows x64 Android开发环境搭建
- android导入项目时提示:invalid project description的解决办法