Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find common.jar (android.arch.core:common:1.1.0) [duplicate]

Tags:

I've created a new project, but when it finish the first compile the new project return an error:

Error:Could not find common.jar (android.arch.core:common:1.1.0). Searched in the following locations:     https://jcenter.bintray.com/android/arch/core/common/1.1.0/common-1.1.0.jar 

I've really no idea how to resolve it, hope you can help me!

Screenshots on how i'm creating a new project:

Creating an android project 1

Creating an android project 2

Creating an android project 3

Creating an android project 4

Build.gradle

buildscript {     repositories {         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:2.2.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 } 

setting.gradle

include ':app' 

I've added the gradle files because i'm thinking there is a problem there.

like image 565
G. Ciardini Avatar asked May 28 '18 16:05

G. Ciardini


1 Answers

Add maven { url 'https://maven.google.com' } before jcenter() in

allprojects {     repositories {         maven { url 'https://maven.google.com' }         jcenter()     } } 

it will work


Update :

Note : google() and maven { url 'https://maven.google.com' } are pointing to the same repo, google() is a Google's Maven repo shortcut. You can add google() instead of maven { url 'https://maven.google.com' } IF you are using :

Gradle >= v.4.x+

Android Studio >= 3.x+

Gradle plugin for Android >= 3.x+

like image 155
E.Abdel Avatar answered Sep 27 '22 00:09

E.Abdel