Gradle project sync completed with some errors - android

My android app is nearing completion, but android studio now seems to be unusable. There are red lines everywhere and the message, "Gradle project sync completed with some errors." I've googled, I've watched youtube videos, but the studio version they're using is older than mine, the UI is different.
I have tried various solutions from SO and around the internet including building the project, changing from local gradle distribution to default wrapper; changing back again; unchecking all the boxes on the android sdk mangager and rechecking them, changing the classpath so that t matches the one in settings; changing it back. Everything is making this worse.
Now, when pressing run, it's showing me an edit configuration window, with the message, "Gradle project sync failed. Please fix your project and try again."
Honestly, I'm just using android-studio to write an app. I don't know how it works or what goes on behind the scenes. I'm a little over my head here.
build.gradle code:
// 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:2.1.2'
// 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
}
app/build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.example.lp1"
minSdkVersion 14
targetSdkVersion 24
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:24.+'
compile 'com.android.support:design:24.2.0'
}
edit: changed appcompat-v7:24.+' to appcompat-v7:24.2.0'
log now reads:
Information:Gradle tasks [:app:assembleDebug]
[Fatal Error] appcompat-v7-24.2.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] recyclerview-v7-24.2.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] support-annotations-24.2.0.pom:2:1: Content is not allowed in prolog.
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not resolve com.android.support:appcompat-v7:24.2.0.
Required by:
Lp1:app:unspecified
Lp1:app:unspecified > com.android.support:design:24.2.0
> Could not resolve com.android.support:appcompat-v7:24.2.0.
> Could not parse POM /home/david/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
> Content is not allowed in prolog.
> Could not resolve com.android.support:recyclerview-v7:24.2.0.
Required by:
Lp1:app:unspecified > com.android.support:design:24.2.0
> Could not resolve com.android.support:recyclerview-v7:24.2.0.
> Could not parse POM /home/david/Android/Sdk/extras/android/m2repository/com/android/support/recyclerview-v7/24.2.0/recyclerview-v7-24.2.0.pom
> Content is not allowed in prolog.
> Could not resolve com.android.support:support-annotations:24.2.0.
Required by:
Lp1:app:unspecified > com.android.support:design:24.2.0 > com.android.support:support-v4:24.2.0 > com.android.support:support-compat:24.2.0
> Could not resolve com.android.support:support-annotations:24.2.0.
> Could not parse POM /home/david/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/24.2.0/support-annotations-24.2.0.pom
> Content is not allowed in prolog.
Information:BUILD FAILED
Information:Total time: 3.244 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

Related

Could not resolve com.android.tools.build:gradle:3.3.2

I was trying to add firebase auth to my android project but getting this error.
I have tried adding 'com.google.firebase:firebase-core:16.0.3' too but its taking more than 40 mins and still not syncing the gradle.
This is build.gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "myaid.startup"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
This is app.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.android.tools.build:gradle:3.3.2'
classpath 'com.google.gms:google-services:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is the error:
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'MyAid'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:3.3.2.
Required by:
project :
Could not resolve com.android.tools.build:gradle:3.3.2.
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.2/gradle-3.3.2.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.2/gradle-3.3.2.pom'.
Connection reset
Could not resolve com.android.tools.build:gradle:3.3.2.
Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.3.2/gradle-3.3.2.pom'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.3.2/gradle-3.3.2.pom'.
Connection reset
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
CONFIGURE FAILED in 2m 13s ERROR: Connection reset
I have resolved this problem by removing all my .gradle files, SDK files, .m2 files, .androidstudio files and then re-installing it.
Followed this answer: How to completely uninstall Android Studio
Please check your gradle's proxy settings. Enable it or disable it in the following file:
~/.gradle/gradle.properties
Like:
systemProp.https.proxyPort=1080
systemProp.http.proxyHost=127.0.0.1
systemProp.https.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080
Advices:
If your connection to repositories is not stable, use a proxy
instead of direct connection.
If you used to use a proxy for
gradle, check if it is still working.

Content is not allowed in prolog during Gradle build

I tried Different methods but the problem did not solved, I even reinstalled android studio but still getting same issue:
[Fatal Error] annotations-26.1.1.pom:2:1: Content is not allowed in prolog.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'myapp'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools:annotations:26.1.1.
Required by:
project : > com.android.tools.build:gradle:3.1.1 > com.android.tools.build:gradle-core:3.1.1 > com.android.databinding:compilerCommon:3.1.1
> Could not resolve com.android.tools:annotations:26.1.1.
> Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.1/annotations-26.1.1.pom
> Content is not allowed in prolog.
> Could not resolve com.android.tools:annotations:26.1.1.
Required by:
project : > com.android.tools.build:gradle:3.1.1 > com.android.tools.build:gradle-core:3.1.1 > com.android.tools.build:builder:3.1.1 > com.android.tools.build:builder-model:3.1.1
project : > com.android.tools.build:gradle:3.1.1 > com.android.tools.build:gradle-core:3.1.1 > com.android.tools.build:builder:3.1.1 > com.android.tools:common:26.1.1
project : > com.android.tools.build:gradle:3.1.1 > com.android.tools.build:gradle-core:3.1.1 > com.android.tools.build:builder:3.1.1 > com.android.tools.analytics-library:shared:26.1.1
project : > com.android.tools.build:gradle:3.1.1 > com.android.tools.build:gradle-core:3.1.1 > com.android.tools.build:builder:3.1.1 > com.android.tools.analytics-library:tracker:26.1.1
project : > com.android.tools.build:gradle:3.1.1 > com.android.tools.build:gradle-core:3.1.1 > com.android.tools.build:builder:3.1.1 > com.android.tools:sdklib:26.1.1 > com.android.tools.layoutlib:layoutlib-api:26.1.1
> Could not resolve com.android.tools:annotations:26.1.1.
> Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.1/annotations-26.1.1.pom
> Content is not allowed in prolog.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
CONFIGURE FAILED in 34s
Content is not allowed in prolog.
app\build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.kakarot.myapp"
minSdkVersion 24
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Project (build.gradle)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I added the app module build.gradle and project build.gradle.
Worked on Android Studio 3.0.1.
Close android studio if it is open already and then delete all the contents of these directories.
C:\Users\USER_NAME\.gradle\caches
C:\Users\USER_NAME\.android\build-cache
C:\Users\USER_NAME\.android\cache
Start Android Studio and and it will probably work. It may take a little bit time to load for the first time.
After a lot of struggle and searching online, i finally solve the problem.
I deleted all the cached folders in gradle and when i build my new project. It work like magic.
Thanks #ישו אוהב אותך for reply and trying to help me.
I solved this by just deleting the cache folders in .gradle folder. This was only thing that worked (it also works for the android studio canary)

How to fix dependency issues in AndroidStudio?

I just clones an android project from my local repo and I have trouble to 'build' it. Maybe it missed some external library, but I do not know.
Upon starting a grade build I get the following message:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> Configuration with name 'default' not found.
I tried to check the 'Manifest' file, but I can't find it. I am completely lost...
I am pretty sure this is a configuration error, therefore all the config files I can find here:
build.gradle (project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.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
}
build.gradle (app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.impyiablue.myapp"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
preDexLibraries = false
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.1.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.google.firebase:firebase-ads:9.0.0'
compile 'in.srain.cube:grid-view-with-header-footer:1.0.12'
compile 'com.github.paolorotolo:appintro:4.1.0'
compile project(path: ':LibraryModule')
}
apply plugin: 'com.google.gms.google-services'
cradle-wrapper.properties
#Wed Sep 07 20:03:05 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
settings.gradle:
include ':app'
include ':libraries:volley'
include ':LibraryModule'
project(':LibraryModule').projectDir = new File('/Users/adietz/AndroidStudioProjects/LIBS')
local.properties:
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Sun Oct 15 11:07:25 CEST 2017
sdk.dir=/Users/adietz/Library/Android/sdk
The output of ./gradlew build (from inside the project folder) is the following:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/Users/adietz/.gradle/wrapper/dists/gradle-2.14.1-all/4cj8p00t3e5ni9e8iofg8ghvk7/gradle-2.14.1/lib/gradle-base-services-2.14.1.jar) to method java.lang.ClassLoader.getPackages()
WARNING: Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> javax/xml/bind/annotation/XmlSchema
* 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: 7.217 secs
Part of the solution seems to be a change in the file build.gradle (for Module:app). If you replace this line
compile project(path: ':LibraryModule')
with this line:
compile project(':libraries:volley')
and do 'Clean Project again', different things might happen:
AndroidStudio start to download stuff
Other gradle files appear mysteriously in your Gradle Scripts folder
Other errors appear (which you can google and actually find some helpful answers)
But it might fix the actual problem...

Gradle exists with non-zero value

I'm working on an Adnroid app that was imported. The imported app used an old version of Gradle so I'm trying to sync it to the new ones (it used Gradle 19 I think). I'm unable to use Gradle 24 b/c there are symbol class finders that can't be found, so I'm just trying to get this working with 21, but it still won't work. Can anyone help?
Here is my outer .build file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
allprojects {
repositories {
mavenCentral()
// maven { url 'http://clinker.47deg.com/nexus/content/groups/public' }
// maven { url 'http://repo1.maven.org/maven2' }
}
}
Here is my inner .build file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.0.0"
defaultConfig {
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.0'
// compile "com.android.support:support-core-utils:21.0.0"
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'se.emilsjolander:stickylistheaders:2.5.2'
compile 'com.github.chrisbanes.photoview:library:1.2.2'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.google.android.gms:play-services:6.1.71'
}
When I run this on an physical android I get this error:
Executing tasks: [:leafsnap:clean, :leafsnap:generateDebugSources, :leafsnap:generateDebugAndroidTestSources, :leafsnap:mockableAndroidJar, :leafsnap:prepareDebugUnitTestDependencies, :leafsnap:assembleDebug]
Configuration on demand is an incubating feature.
Observed package id 'add-ons;addon-google_apis-google-24' in inconsistent location 'C:\Users\Butters Stotch\AppData\Local\Android\Sdk\add-ons\addon-google_apis-google-24-1' (Expected 'C:\Users\Butters Stotch\AppData\Local\Android\Sdk\add-ons\addon-google_apis-google-24')
Already observed package id 'add-ons;addon-google_apis-google-24' in 'C:\Users\Butters Stotch\AppData\Local\Android\Sdk\add-ons\addon-google_apis-google-24'. Skipping duplicate at 'C:\Users\Butters Stotch\AppData\Local\Android\Sdk\add-ons\addon-google_apis-google-24-1'
Incremental java compilation is an incubating feature.
:leafsnap:clean
:leafsnap:preBuild UP-TO-DATE
:leafsnap:preDebugBuild UP-TO-DATE
:leafsnap:checkDebugManifest
:leafsnap:preReleaseBuild UP-TO-DATE
:leafsnap:prepareComAndroidSupportAppcompatV72100Library
:leafsnap:prepareComAndroidSupportSupportV42100Library
:leafsnap:prepareComGoogleAndroidGmsPlayServices6171Library
:leafsnap:prepareSeEmilsjolanderStickylistheaders252Library
:leafsnap:prepareDebugDependencies
:leafsnap:compileDebugAidl
:leafsnap:compileDebugRenderscript
:leafsnap:generateDebugBuildConfig
:leafsnap:mergeDebugShaders
:leafsnap:compileDebugShaders
:leafsnap:generateDebugAssets
:leafsnap:mergeDebugAssets
:leafsnap:generateDebugResValues UP-TO-DATE
:leafsnap:generateDebugResources
:leafsnap:mergeDebugResources
:leafsnap:processDebugManifest
:leafsnap:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':leafsnap:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Butters Stotch\AppData\Local\Android\Sdk\build-tools\21.0.0\aapt.exe'' finished with non-zero exit value -1073741819
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I can't figure out what's wrong with it. Can anyone help?
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}
You're using gradle plugin 2.1.3 which according to documentation needs the following as must have dependencies.
Android Plugin for Gradle, Revision 2.1.3 (August 2016)
Dependencies:
Gradle 2.14.1 or higher.
Build Tools 23.0.2 or higher.
This update adds compatibility with Gradle 2.14.1, which includes performance improvements, new features, and an important security fix.
For more details, see the Gradle release notes.
whereas your build tool version currently set as buildToolsVersion "21.0.0".
Change the build tool version to 23.0.2, update the support and appcompat dependencies accordingly and sync again.

Android Studio 1.3 will not work with jcenter() Android Repository

Project build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Module build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc3"
defaultConfig {
applicationId "com.example.mark.god_dam_supportlib"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v21:22.2.1'
compile 'com.android.support:appcompat-v7:22.2.1'
}
tried:
Putting the URL for bintray in the jcenter()
.
Disable offline mode
Made sure jcenter was in Project Structure - > Project - > [Android Plugin Repository && Default Library Repository].
Toggled disable offline mode.
Removed and reinstalled Android Support Repository,
Android Support Library (many times).
No network proxy.
Set the .gradle to 777.
No Matter what get on a gradle sync:
Error:(25, 13) Failed to resolve: com.android.support:appcompat-v21:22.2.1
Install Repository and sync projectShow in FileShow in Project Structure dialog
Click on “ Install Repository and sync project”
Error message in the “Install Missing Components” dialog:
Loading SDK information...
Ignoring unknown package filter 'extra-android-m2repository'Warning: The package filter removed all packages. There is nothing to install.
Please consider trying to update again without a package filter.
As well in red at the bottom of “Install Missing Components” dialog”
Imstailed Failed: Please check your network conection and try again. You may continue creating your project, but it will not compile correctly without the missing components
On a Gradle build get:
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find com.android.support:appcompat-v21:22.2.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/appcompat-v21/22.2.1/appcompat-v21-22.2.1.pom
https://jcenter.bintray.com/com/android/support/appcompat-v21/22.2.1/appcompat-v21-22.2.1.jar
file:/home/usr/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v21/22.2.1/appcompat-v21-22.2.1.pom
file:/home/usr/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v21/22.2.1/appcompat-v21-22.2.1.jar
file:/home/usr/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v21/22.2.1/appcompat-v21-22.2.1.pom
file:/home/usr/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v21/22.2.1/appcompat-v21-22.2.1.jar
Required by:
Name_ofApp_folder:app:unspecified
Checked Google, Stack Over Flow.
Box is an Ubuntu 14.04 LTS straight up desktop.
Went as far as trying to down load the Android Support Repository manually could find a download page.
As An Aside used these “ Android Support Repository” first quarter of the year with out any grief (need to update one!).
Completely and totally out of ideas and getting dangerously low on patience as well
Failed to resolve: com.android.support:appcompat-v21:22.2.1 Install Repository and sync project
That is because there is no artifact named com.android.support:appcompat-v21. It is called com.android.support:appcompat-v7, and you already have a compile statement for it. Delete the compile statement for com.android.support:appcompat-v21.
Note that none of this has anything to do with JCenter, despite your question title.

Categories

Resources