Why doesn't jcenter resolve dependency, but mavenCentral can?

I have a project with two dependencies, relatively standard appcompat-v7 and ion . So my gradle files are pretty simple:

Project

 buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' } } allprojects { repositories { jcenter() } } 

applications

 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.0" defaultConfig { applicationId "zz.yy.xx" minSdkVersion 18 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']) compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.koushikdutta.ion:ion:2.1.6' } 

In fact, I think the only thing I added is the ion dependency.

I am not a gradle guru, but I read in several places that jcenter is the so-called superset of mavenCentral . In particular, this answer

JCenter itself is a thin veneer on top of Maven Central. He proxies it (more or less successfully) and adds additional components. Both devices are hosted on CDN networks and are high performance. Maven Central itself is the goal for all Eclipse, Apache, and most other open source projects, and without it, JCenter will be mostly empty.

and this

You do not need both. JCenter is a superset of Maven Central and should be enough for all dependencies.

I am with JFrog, a company behind Bintray and [artifactory], see my profile for details and links.

make me believe that they are essentially the same as for software packages, only in jcenter is better. Especially the poster of the last answer seems to know what he is talking about.

However, I cannot tighten the ion dependency on jcenter. I always get this error

enter image description here

To make it work, I need to add mavenCentral. Therefore, the gradle fragment above does not work, but if I changed allprojects to this

 allprojects { repositories { jcenter() mavenCentral() } } 

he magically begins to work.

How is this possible? I have confirmed that both offer a package:

Gradle settings

enter image description here

I tried the local shell without success.

Android Studio 1.3.2
Gradle 1.3.0

+6
source share

All Articles