Android Studio Exception: Could not find method android() for arguments
来源:互联网 发布:tourex 6.0 源码 编辑:程序博客网 时间:2024/05/01 23:30
问题描述
Android Studio完成2.2版升级,新建项目并运行gradle sync,发生错误:
Gradle sync failed: Could not find method android() for arguments [build_...
- 1
- 1
build.gradle内容如下。
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { jcenter() }}task clean(type: Delete) { delete rootProject.buildDir}android {compileSdkVersion 22buildToolsVersion '22.0.0'}dependencies {}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
解决方法
此为顶层的build.gradle文件内容错误,不允许定义android{…}代码块,因此,移除此节点即可。
在app module下已存在build.gradle文件,其中已经包含了 android{…}代码块。
参考
http://stackoverflow.com/questions/40012866/could-not-find-method-android-for-arguments-in-android-studio-project
0 0
- Android Studio Exception: Could not find method android() for arguments
- Android Studio Exception: Could not find method android() for arguments
- Android Studio:Could not find method android() for arguments
- Android Studio Could not find method runProguard() for arguments?
- Could not find method android() for arguments
- 解决Android Studio 导入外部项目时报错:Could not find method android() for arguments
- Android Studio 解决错误 Could not find method android() for arguments
- Could not find method android() for arguments Android Studio 解决错误
- Android Studio 解决错误 Could not find method android() for arguments
- Android studio Error:(22, 0) Could not find method android() for arguments [build_cxgvc055pb3xpt91ip
- Android Studio 出现错误 Could not find method android() for arguments .... 问题及解决
- Android Studio Could not find method android() for arguments 错误解决
- Android Studio报错:Error[*,*]Could not find method android() for arguments [……]
- 解决Could not find method android() for arguments问题
- 解决Could not find method android() for arguments问题
- 解决问题:Could not find method android() for arguments
- 解决Could not find method android() for arguments问题
- Android Studio中 Error:Could not find method compile() for arguments
- 中国智能制造亟需突破关键共性技术
- 1055. 集体照 (25)
- IMX6S核心板驱动剪裁
- Yaws(erlang web服务器框架) 学习记录之一
- iOS编译Speex
- Android Studio Exception: Could not find method android() for arguments
- 算法导论 练习题 7.4-5
- Android AsyncTask原理分析
- SPOJ 17125 TBATTLE
- ZigBee 3.0 《Base-Device-Behavior-Specification》--General requirements
- cat命令
- [BZOJ 2906]颜色:分块
- 《2017中国大数据发展前景报告》-奥威大数据分析平台
- vfio 通过eventfd拿到kernel的中断