I was trying to follow the instructions from Google developers in setting up Google play services: https://developer.android.com/google/play-services/setup.html
And in the step 2, I copied this:
apply plugin: 'android'
...
dependencies {
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services:6.1.+'
}
in the gradle file, then I realized that that piece of code was already there, with the exception of the last line(...sevices:6.1.+'), I copied the compile 'com.google.android.gms:play-services:6.1.+'
and placed where it belongs,now my gradle looks like: apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '20.0.0'
defaultConfig {
applicationId 'theapp.application.developer.moreappinfo.seconpart'
minSdkVersion 7
targetSdkVersion 19
versionCode 3
versionName '1.2'
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile 'com.android.support:appcompat-v7:20.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:6.1.+'
}
went to sync with gradle files and this error appears an I don't know how to fix it:
Error:
Failed to find: com.android.support:appcompat-v7:20.0.0
Error:Open in Project Structure dialog
Open File
You need to install the "Android Support Repository" in your SDK Manager.
Open your Android SDK Manager
Scroll down to the "extras" folder, and check the box next to "Android Support Repository"
Click "Install packages..." and accept all of the licenses that it asks you to accept.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.