我的系统突然关闭并打开电源,但出现错误:无法解决: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/