Error:(9, 1) A problem occurred evaluating root project 'MyAndroidTutorial'.
> Could not find method complie() for arguments [com.google.android.gms:play-services:8.1.0] on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@429c3aa0.
Source : /build.gradle
These are two problem,// 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:1.5.0'
complie 'com.google.android.gms:play-services:8.1.0'
compile "com.android.support:appcompat-v7:22.1.0"
// 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 }
- Be ware not to place the application dependencies (compile 'com.google.android.gms:play-services:9.0.1'compile "com.android.support:appcompat-v7:22.1.0") at file named "build.gradle" which's located at project root. You should add that in "build.gradle" in your module, for example, /app/build.gradle.
- Error is caused by a stupid careless mistake: be ware it should be "compile" but not complie. That's mean this sentence should be corrected :
compile 'com.google.android.gms:play-services:8.1.0'
compile "com.android.support:appcompat-v7:22.1.0"
No comments :
Post a Comment