找不到common.jar(android.arch.core:common:1.1.0) [英] Could not find common.jar (android.arch.core:common:1.1.0)

查看:174
本文介绍了找不到common.jar(android.arch.core:common:1.1.0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个新项目,但是当它完成第一次编译时,新项目将返回错误:

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:

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'

我添加了gradle文件,因为我认为那里存在问题.

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

推荐答案

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

它将起作用


更新:

it will work


Update :

注意:google()maven { url 'https://maven.google.com' }指向相同的存储库,google()是Google的Maven存储库快捷方式.您可以添加google()而不是maven { url 'https://maven.google.com' } 如果使用的是:

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 +

Gradle >= v.4.x+

Android Studio> = 3.x +

Android Studio >= 3.x+

适用于Android的Gradle插件> = 3.x +

Gradle plugin for Android >= 3.x+

这篇关于找不到common.jar(android.arch.core:common:1.1.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆