Android Studio Exception: Could not find method android() for arguments
来源:互联网 发布:曲谱制作软件 编辑:程序博客网 时间:2024/05/02 04:44
问题描述
Android Studio完成2.2版升级,新建项目并运行gradle sync,发生错误:
Gradle sync failed: Could not find method android() for arguments [build_...
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 {}
解决方法
此为顶层的build.gradle文件内容错误,不允许定义android{…}代码块,因此,移除此节点即可。
在app module下已存在build.gradle文件,其中已经包含了 android{…}代码块。
参考
http://stackoverflow.com/questions/40012866/could-not-find-method-android-for-arguments-in-android-studio-project
1 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
- jpa或bernate使用原生sql进行关联查询org.hibernate.hql.internal.ast.QuerySyntaxException: Path expected for join
- js屏蔽/过滤 特殊字符,输入就删除掉,实时删除,
- react native 实现动态高度Listview 和图文混排
- selenium-webdriver(python) (十)
- This Android SDK requires And...e ADT to the latest version.
- Android Studio Exception: Could not find method android() for arguments
- Android自定义View绘图基础(摘自技术前沿)
- jsp页面EL表达式不被解析的解决方法
- lua解析UserAgent
- 神经网络误差反向传播
- iOS10的适配总结(转)
- 如何估算网站日承受最大访问PV
- java mybatis XML文件中大于号小于号转义
- app开发外包注意事项,2017最新资讯