2017-05-27 56 views
0

法的Android()我使用Android 2.3.2工作室,这里是我的gradle这个文件找不到参数

// Top-level build file where you can add configuration options common to all sub-projects/modules. 
buildscript { 
    repositories { 
     jcenter() 
     mavenCentral() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.1' 
     classpath 'com.google.gms:google-services:2.1.0' 
    } 
} 
android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.3' 
} 
dependencies { 
} 

我也更新gradle这个,但我仍然有问题,运行项目!

回答

0

卸下:

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.3' 
} 
dependencies { 
} 

那些属于在模块级build.gradle文件(例如,app/build.gradle),而不是在顶层build.gradle文件。

您可能需要在Android Studio中创建一个新的空项目,并在继续之前查看它放入build.gradleapp/build.gradle的内容。