我最近下载了Android工作室(2.3),它给出了以下错误。有谁可以帮助我?
Gradle sync failed: Cause: startup failed:
build file '/Users/shervinkoulena/AndroidStudioProjects/HelloWorld3/app/build.gradle': 1: expecting EOF, found ':' @ line 1, column 14.
5apply plugin: 'com.android.application'
抱歉,我是编程新手。如果它有帮助我也使用mac。这是我看到的build.grade内容:
5apply plugin:
'com.android.application' android {
compileSdkVersion 25
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.example.shervinkoulena.helloworld"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso- core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
testCompile 'junit:junit:4.12'
}
答案 0 :(得分:1)
在build.gradle apply plugin: 'com.android.application'