gpt4 book ai didi

android - Gradle 同步失败 - 无法解析 : appcompat-v7:26

转载 作者:搜寻专家 更新时间:2023-11-01 09:20:56 25 4
gpt4 key购买 nike

我在我的 app/build.gradle 中使用这段代码。

  android {
compileSdkVersion 26
defaultConfig {
applicationId "com.avizhegroup.android.dsmmaps"
minSdkVersion 21
targetSdkVersion 26
versionCode 2
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
}



repositories {
maven {
url "https://jitpack.io"
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:26.1.0'
implementation 'com.google.android.gms:play-services-maps:11.0.4'
implementation 'com.android.volley:volley:1.1.0'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.github.zookey:universalpreferences:0.0.4'
implementation 'com.google.android.gms:play-services-location:11.0.4'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.github.bosphere.android-filelogger:filelogger:1.0.3'
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
implementation 'com.orhanobut:logger:2.2.0'
implementation 'com.orhanobut:logger:2.1.1'
implementation 'com.orhanobut:dialogplus:1.11@aar'
implementation files('libs/usbdriver.jar')
implementation files('src/main/libs/rlmotgusbdriver.jar')
implementation 'me.imid.swipebacklayout.lib:library:1.1.0'
implementation 'com.felipecsl.asymmetricgridview:library:2.0.1'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
}

我在同步 Gradle 时遇到问题。出现了这些问题:

ERROR: Failed to resolve: design
Affected Modules: app
ERROR: Failed to resolve: appcompat-v7
Affected Modules: app
ERROR: Failed to resolve: transition
Affected Modules: app
ERROR: Failed to resolve: recyclerview-v7
Affected Modules: app
ERROR: Failed to resolve: support-v4
Affected Modules: app
ERROR: Failed to resolve: support-media-compat
Affected Modules: app
ERROR: Failed to resolve: animated-vector-drawable
Affected Modules: app
ERROR: Failed to resolve: support-vector-drawable
Affected Modules: app
ERROR: Failed to resolve: support-fragment
Affected Modules: app
ERROR: Failed to resolve: support-core-utils
Affected Modules: app
ERROR: Failed to resolve: support-core-ui
Affected Modules: app
ERROR: Failed to resolve: support-compat
Affected Modules: app
ERROR: Failed to resolve: support-annotations
Affected Modules: app
ERROR: Failed to resolve: runtime
Affected Modules: app
ERROR: Failed to resolve: common
Affected Modules: app

我在首选项中取消选中实验中的变体,更改依赖项,更改 SDK 版本,更改等级版本和...。此代码在 Windows 中有效,但在 Mac 中无效。
我使用约束布局和 AndroidStudio3.3.2
我该如何纠正这个问题?
谢谢

最佳答案

将 google maven 添加到根 build.gradle 中,如下所示:

allprojects {
repositories {
jcenter()
mavenCentral()
google()

}
}

关于android - Gradle 同步失败 - 无法解析 : appcompat-v7:26,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55567904/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com