android-studio - 错误:无法解决:android.arch.core:常见:1.1.0

标签 android-studio android-gradle-plugin build.gradle

我的系统突然关闭并打开电源,但出现错误:无法解决:android studio中的android.arch.core:common:1.1.0错误。我曾尝试清理并重建项目,但没有成功。我已经在互联网上进行了研究,但没有一个可以解决我的问题。

建立。 gradle(项目)

// 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.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

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

task clean(type: Delete) {
delete rootProject.buildDir
}

build.gradle(App)
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.1"
defaultConfig {
    applicationId "com.example.system2.tranxav"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
  "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
} 

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
{
    exclude group: 'com.android.support', module: 'support-annotations'
})

   compile 'com.stripe:stripe-android:6.1.1'
compile 'com.stripe:stripe-java:1.47.0'
compile 'com.stripe:stripe-android:1.0.4'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
 compile 'com.android.volley:volley:1.0.0' // dependency file for Volley
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.1.0'
compile 'com.android.support:recyclerview-v7:27.1.0'
compile 'com.android.support:design:27.1.0'
compile 'com.basgeekball:awesome-validation:1.3'
compile 'com.parse:parse-android:1.16.5'
compile 'com.parse.bolts:bolts-tasks:1.4.0'
compile 'com.parse.bolts:bolts-applinks:1.4.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
}

我不知道是什么原因造成的。

最佳答案

我通过将maven {url "https://maven.google.com"}移到jcenter()之前来解决此问题,如下所示:

repositories {
    maven { url "https://maven.google.com" }
    jcenter()
    maven { url 'https://jitpack.io' }
}

这是因为我发现jcenter()储存库已删除android.arch.core的目录,因此我们必须从android.arch.core:common-1.1.0.jar获取此文件("https://maven.google.com")

关于android-studio - 错误:无法解决:android.arch.core:常见:1.1.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49839322/

相关文章:

android - 约束布局需要澄清

android - 如何永久删除在创建新应用程序时不显示的 android 测试和测试文件夹

android - 设置了compileOptions,无法运行 “gradlew”

android-studio - Gradle同步失败:找不到参数[com.google.android.gms:play-services-ads:18.2.0]的方法Implementation()

android - 如何查找Android应用程序中是否正在使用Java包?

android - 使用新的 Android Studio 项目,任务 ':app:dexDebug' 的 Gradle 执行失败

android - 除非在 Android Studio 中打开,否则 Gradle 不会选择 Android 构建工具

gradle - Android Gradle在运行测试之前跳过构建?

android - 将 Android studio 更新到 Arctic Fox 版本并将 gradle 升级到 7.0.0 后出现 gradle 错误

android - 所有 com.google.android.gms 库都必须使用完全相同的版本规范吗?