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

查看:31
本文介绍了找不到 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.

推荐答案

jcenter()maven { url 'https://maven.google.com' }> 在

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

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

它会起作用<小时>更新:

注意:google()maven { url 'https://maven.google.com' } 指向相同repo, 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天全站免登陆