The gradle build of my Android project is failing because a dependency of my project needs an older version of the android gradle plugin:
Download https://repo1.maven.org/maven2/org/springframework/android/spring-android-core/1.0.1.RELEASE/spring-android-core-1.0.1.RELEASE.jar
Download https://repo1.maven.org/maven2/org/springframework/android/spring-android-rest-template/1.0.1.RELEASE/spring-android-rest-template-1.0.1.RELEASE.jar
Download https://repo1.maven.org/maven2/org/springframework/spring-asm/3.0.7.RELEASE/spring-asm-3.0.7.RELEASE.jar
Download https://repo1.maven.org/maven2/org/springframework/spring-core/3.0.7.RELEASE/spring-core-3.0.7.RELEASE.jar
Download https://repo1.maven.org/maven2/org/springframework/security/spring-security-crypto/3.1.3.RELEASE/spring-security-crypto-3.1.3.RELEASE.jar
Download https://repo1.maven.org/maven2/org/springframework/social/spring-social-core/1.0.2.RELEASE/spring-social-core-1.0.2.RELEASE.jar
Download https://repo1.maven.org/maven2/org/springframework/android/spring-android-auth/1.0.1.RELEASE/spring-android-auth-1.0.1.RELEASE.jar
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.1.1/jackson-annotations-2.1.1.jar
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.1.1/jackson-core-2.1.1.jar
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.1.2/jackson-databind-2.1.2.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':myapp'.
> Could not resolve all dependencies for configuration ':myapp:classpath'.
> Could not find any version that matches com.android.tools.build:gradle:0.7.+.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml
https://maven.fabric.io/public/com/android/tools/build/gradle/maven-metadata.xml
https://maven.fabric.io/public/com/android/tools/build/gradle/
Required by:
phase1:myapp:unspecified > com.jakewharton.hugo:hugo-plugin:1.1.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 20.894 secs
My project uses com.android.tools.build:gradle:1.0.0, but the dependency, com.jakewharton.hugo, is looking for gradle:0.7.+.
Here are my gradle build files.
Top-level build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
allprojects {
repositories {
mavenCentral()
}
}
Subproject build.gradle:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.jakewharton.hugo:hugo-plugin:1.1.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'hugo'
android {
compileSdkVersion 20
buildToolsVersion '21.1.2'
defaultConfig {
minSdkVersion 13
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
productFlavors {
}
}
..
..
..
Looking up Hugo on Github, I verified that release 1.1.0 does ask for the version 0.7.+, but the latest code (unreleased) use the new version (1.1.0)
Is there a way to allow Hugo to build with the old version, while building the rest of my project with the new one?
OR
I copied the top level Hugo source directory from Github into my project. How do I tell gradle to find the hugo plugin there?
We experienced the same issue. If you change your repository to mavenCentral() from jcenter(), it should resolve the issue. Its also possible to have both repositories.
Related
I tried to add the Fresco library by to my project by adding this to my app-level gradle file
implementation 'com.facebook.fresco:fresco:1.8.0'
Then I get the follwing error message:
Gradle DSL method not found: 'implementation()' Possible causes:
The project may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 3.0.1 and sync project
The project may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
The build file may be missing a Gradle plugin. Apply Gradle plugin
When I run gradle --version it tells me that I am using gradle 4.5.
This is my top-level gradle file.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "http://dl.bintray.com/populov/maven"}
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is my app-level gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
defaultConfig {
applicationId "com.example.project1.3"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "state1.0"
renderscriptTargetApi 24
renderscriptSupportModeEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// lots of other dependencies
implementation 'com.facebook.fresco:fresco:1.8.0'
}
I also have this in my gradle-wrapper.properties file.
distributionUrl= https\://services.gradle.org/distributions/gradle-4.1-all.zip
I have basically tried everything from here https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html but the problem persists.
Any help would be greatly appreciated. Thank you!
My guess is that probably one of your other dependencies is causing the issue,
I run the exact same app & project gradle files you provided in a new project and synced with no problem.
You can try the following:
1) substitute implementation 'com.facebook.fresco:fresco:1.8.0' with compile'com.facebook.fresco:fresco:1.8.0' (deprecated but it will help with the troubleshooting) and see if it will sync properly.
2) start a new project and use the same gradle file and see if the problem still exists.
If nothing works please post the complete app level gradle file to check again.
I created a project with Android Studio Preview 3.0 (Canary 2) to start Kotlin development. I used the Android Studio Fabric Plugin to setup Fabric for my project.
But when I want to upload a beta version of my app to Fabric Beta (Crashlytics) with the following command
./gradlew crashlyticsUploadDistributionDebug
I receive the following error:
Configuration 'compile' in project ':app' is deprecated. Use
'implementation' instead. Configuration 'testCompile' in project
':app' is deprecated. Use 'testImplementation' instead. The
Task.leftShift(Closure) method has been deprecated and is scheduled to
be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
registerResGeneratingTask is deprecated, use
registerGeneratedFolders(FileCollection) registerResGeneratingTask is
deprecated, use registerGeneratedFolders(FileCollection)
:app:crashlyticsUploadDistributionDebug FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:crashlyticsUploadDistributionDebug'.
Not valid.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 1s 1 actionable task: 1 executed, 0 avoided (0%)
I do not have any idea, what "Not valid" means.
This is my root build.gradle:
buildscript {
ext.kotlin_version = '1.1.2-4'
repositories {
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.ajoberstar:grgit:1.9.0'
classpath 'io.fabric.tools:gradle:1.22.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
ext {
supportLibVersion = "25.3.1"
buildVersion = "25.0.3"
daggerVersion = "2.9"
rxJavaVersion = "2.1.0"
rxAndroidVersion = "2.0.1"
countGitCommits = { ->
git = Grgit.open()
def commitCount = git.log(includes: ['HEAD']).size()
println("INFO: Number of commits $commitCount")
return commitCount
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And this is the app build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 25
buildToolsVersion "$buildVersion"
defaultConfig {
applicationId "com.kotlin.sample"
minSdkVersion 21
targetSdkVersion 25
def numberOfCommits = countGitCommits()
versionCode 1000 + numberOfCommits
versionName "0.1.$numberOfCommits"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile files('libs/API_ADK.jar')
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile "com.android.support:support-v4:$supportLibVersion"
compile "com.android.support:design:$supportLibVersion"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'io.reactivex.rxjava2:rxkotlin:2.0.3'
compile "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
compile "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
compile 'com.jakewharton.timber:timber:4.5.1'
compile "com.google.dagger:dagger:$daggerVersion"
// Needed for #Generated annotation (missing in Java <= 1.6; therefore, Android)
compile 'javax.annotation:jsr250-api:1.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
testCompile 'junit:junit:4.12'
}
The fabric.properties file with the apiSecret is also placed in the project.
Edit:
A manual upload of the APK to Fabric Beta works.
I just want to point to the comment from Mike Bonnell as it answers this question:
Our command line tools are not compatible with the Alpha version of Gradle 3. We're looking into the changes that have come with the alpha versions, but we test against betas and stable versions of the releases.
Edit 2017/08/25
Tried with Android Studio 3.0 Beta 3 and the corresponding android gradle plugin. The gradle task crashlyticsUploadDistributionDebug seems to work again.
My project is comprised of two modules, one is the application module and the other is a library module. My build processes works fine until I added two gradle plugins :
This is the root build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.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
}
This is a library module build.gradle:
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
resourcePrefix "looping_banner_res_"
defaultConfig {
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:support-v4:24.1.0'
}
I don't think there are something wrong with the build files, but I got a error when I run gradle clean :
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:606)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:572)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:569)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:568)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:565)
* Where:
Build file '/home/lic/code/private/github/looping-banner/banner/build.gradle' line: 3
Why did this issue happen and how to solve this ?
I have searched some answer, but not work for me, are there something wrong in the two plugins which I import ?
OK, after a lot searchings about this issue, I finally worked it out.
I'm using Gradle 2.14, so I need to change
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
to
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
There are a lot of differences, and here we can see more details.
I had that error until I shorten the version code length from "2017041201" to 8 characters number:
android-versionCode="20170412"
This question is old, but I found it because I was having this problem -
For some reason I got this error from Cordova/Ionic when installing a plugin.
It was fixed when I typed the command
ionic plugin add foo
instead of (leading space)
ionic plugin add foo
i have a same issue, and the problem was that have dot in android-versionCode,
like: android-versionCode="10001.1"
You are missing mavencentral() in repository dependency. Maybe that is causing the issue
repositories {
mavenCentral()
}
I get this error coz of the ANDROID_HOME getting set to /usr/local/Caskroom/android-platform-tools/latest.
I do not know why it's getting set to the above mentioned value.
But after correcting this and setting it to /Users/<user_name>/Library/Android/sdk/, the error goes away.
This worked for me
Remove android / Add android:
cordova platform rm android
cordova platform add android
Hey I'm working on a project and I was trying to use the ProtoBuf Gradle Plugin. At first I was getting this issue because I currently have Gradle 2.10 installed so I followed the instructions here as well a
According to this, the Gradle files were moved to JCenter but when I followed the urls, I got a 404 response. I tried changing the distribution URL as in this answer and then invalidating the cache and restarting but that didn't fix it either. In frustration I deleted the stuff in the .gradle folder (trying to clear the cache) but that didn't work either and I haven't been able to get them back.
I tried changing it to the default wrapper as an answer I can't find again suggested that didn't work. I tried downloading Gradle 2.13 on my own and placing it in the Android Studio directory but Windows 8 deleted it.
The only thing I can think of is that this is my first time actually putting Gradle to use on this computer and I don't have admin rights. Earlier in the session, I closed out of an Admin Password request for something to do with the Java SE. I don't know how to undo that. Any help would be appreciated.
Other answers I tried:
https://stackoverflow.com/a/34179425/6421112 - Android Support Repository is installed fine.
https://stackoverflow.com/a/34749866/6421112
The error I'm getting is listed bellow, I had to censor the url part from the urls.
Error:Could not find com.android.tools.build:gradle:2.13.0. Searched in the following locations:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.13.0/gradle-2.13.0.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.13.0/gradle-2.13.0.jar
%jcenter%/android/tools/build/gradle/2.13.0/gradle-2.13.0.pom
%jcenter%/android/tools/build/gradle/2.13.0/gradle-2.13.0.jar Required by:
:MyApplication:unspecified
Here's a stacktrace:
Required by:
:BluetoothHeartbeat:unspecified
at org.gradle.internal.resolve.result.DefaultBuildableComponentResolveResult.notFound(DefaultBuildableComponentResolveResult.java:38)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolveModule(RepositoryChainComponentMetaDataResolver.java:88)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolve(RepositoryChainComponentMetaDataResolver.java:59)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.ComponentResolversChain$ComponentMetaDataResolverChain.resolve(ComponentResolversChain.java:80)
at org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver.resolve(ClientModuleResolver.java:44)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionResolveState.resolve(DependencyGraphBuilder.java:560)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionResolveState.getMetaData(DependencyGraphBuilder.java:570)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphBuilder.java:256)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBuilder.java:230)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:137)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:75)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:88)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:78)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:78)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:41)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:39)
at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:91)
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver.resolve(SelfResolvingDependencyConfigurationResolver.java:40)
at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolve(ShortCircuitEmptyConfigurationResolver.java:52)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolve(ErrorHandlingConfigurationResolver.java:43)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:371)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveNow(DefaultConfiguration.java:346)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:339)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:664)
... 53 more
BUILD FAILED
Total time: 3.89 secs
Here's my build.gradle (MyApplication)
// 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.13.0'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.7'
// 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
}
And here's the other build.gradle (app):
apply plugin: 'com.android.application'
//applyplugin: 'com.google.protobuf'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.MyApplication"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}
I answered this on my own. Turns out the Android Plugin version for this version is com.android.tools.build:gradle:2.1.2. I set it to that and the latest version downloaded fine.
I am trying to integrate the Google Play Game Services with my project. I have added the play services as a dependency to my build.gradle, but when I try to rebuild the project I get this error:
* What went wrong:
A problem occurred configuring project ':android'.
> Could not resolve all dependencies for configuration ':android:_debugCompile'.
> Could not find com.android.support:support-v4:19.0.1.
Required by:
Taxi Trouble:android:1.0 > com.google.android.gms:play-services:4.3.23
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
According to the SDK manager I have version 19.1, instead of the required 19.0.1. Can I install this older version of the support library?
Please share your build.gradle file. The following example, taken from an update to the Play-Google Play Games Services GitHub pages, shows a working build.gradle file with the latest support library.
First, note that there are multiple build.gradle files and settings.gradle files in a particular project/workspace. Let's focus on the two most likely candidates for breaking your build.
root (build.gradle) (e.g. root/build.gradle)
Android module for your app (e.g. root/module/build.gradle)
Root project build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
build.gradle from within a project module:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.0.3'
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gms:play-services:4.3.23'
//compile project(':libraries:BaseGameUtils')
}
buildscript {
repositories {
mavenCentral()
}
}
repositories {
}
}
It's a little confusing at first but your gradle build library version must match your ADT version which must match your GMS version. As Android Studio stabilizes, required updates to match configurations across tools and Android libraries will hopefully become less common.