您好,欢迎来到爱玩科技网。
搜索
您的当前位置:首页解决Couldnotfindmethodandroid()forarguments问题

解决Couldnotfindmethodandroid()forarguments问题

来源:爱玩科技网


解决Couldnotfindmethodandroid()forarguments问题

解决Could not find method android() for arguments问题

在导入新项目的时候,发现一直有个bug存在,编译出现如下错误:

Error:(23, 0) Could not find method android() for arguments [****] on root project '****' of type

org.gradle.api.Project.

最终解决方案:打开项目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.2'

classpath 'com.novoda:bintray-release:0.3.4'

// 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 23

buildToolsVersion '23.0.3' }

dependencies {

}

将其中的

android {

compileSdkVersion 23

buildToolsVersion '23.0.3' }删除或注释掉后重新编译通过。

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- aiwanbo.com 版权所有 赣ICP备2024042808号-3

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务