![](/img/trans.png)
[英]Inflate exception occurs 'androidx.appcompat:appcompat:1.1.0'
[英]ERROR: Failed to resolve: androidx.appcompat:design:1.1.0
当我在 build gradle(module app) 中实现'androidx.appcompat:design:1.1.0'
代码时,它说ERROR: Failed to resolve: androidx.appcompat:design:1.1.0
我尝试在 appscompact 版本中更改实现'androidx.appcompat:appcompat:1.1.0'
它再次显示错误
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.bottomnavigation"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:design:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
错误:无法解决:androidx.appcompat:design:1.1.0 显示在项目结构对话框中受影响的模块:app
给你Design Support Library
你需要使用的androidx
Design Support Library
用这个
implementation 'com.google.android.material:material:1.0.0'
代替
implementation 'androidx.appcompat:design:1.1.0'
为了消除误差,
取而代之的是:
implementation 'androidx.appcompat:design:1.1.0'
写这个:
implementation 'com.google.android.material:material:1.2.1'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.