嘿,我将一个项目导入了我的android studio,当我尝试构建该项目时,它在错误日志中显示了此错误:
错误:找不到com.android.support:appcompat-v7:27.0.1。
要求: 项目:app在build.gradle文件中搜索
build.gradle
android {
compileSdkVersion 27
buildToolsVersion "28.0.3"
defaultConfig {
multiDexEnabled true
applicationId "com.ezs.boostantiv"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1"
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/android-query-full.0.26.2-beta.1.jar')
// compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
compile 'com.commit451:PhotoView:1.2.4'
compile 'com.android.support:appcompat-v7:27.0.1'
compile 'com.android.support:support-v4:27.0.1'
compile 'com.android.support:cardview-v7:27.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.kenumir:MaterialSettings:v.1.2.2'
compile 'com.android.support:design:27.1.1'
compile 'com.jakewharton:butterknife:8.2.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
}
请让我知道如何解决此问题。提前非常感谢您。
答案 0 :(得分:1)
迁移到androidx库。要将当前库映射到androidx,请访问developer.android.com
答案 1 :(得分:1)
切换到Androidx库,在依赖项下方添加
实现'androidx.appcompat:appcompat:1.1.0'