android - Android Studio:无法解决:fragment-1.1.0
问题描述
我想在我的项目中添加一个名为 material 的库,但是当我尝试同步它时,它给了我标题中提到的错误。安卓工作室 4.0.1。
build.gradle(应用程序模块)
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.example.app"
minSdkVersion 14
targetSdkVersion 30
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.constraintlayout:constraintlayout:1.1.3'
/*implemention for material shown below*/
implementation 'com.google.android.material:material:1.3.0-alpha02'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
解决方案
推荐阅读
- ios - 同一列表中的多个 ForEach 与具有一个 ForEach 的多个列表
- python-3.x - 带有文件和数据的 Django DRF Post 在 Postman 中工作,而不是 Python。没有临时上传文件
- php - 如何创建包含 HTML 和 PHP 代码混合的自定义字段并将其附加到用户
- image - 谷歌搜索 API searchType = image
- node.js - NodeJS 使用 GQL 创建和 POST 文件
- javascript - 如何从 msearch 返回一个数组命中
- optimization - 模型预测控制框架中轨迹优化切换输入值能力的约束
- docker - 在 Docker 中,绑定挂载 nscd 套接字会破坏 gethostbyname
- java - 传递 Observable 列表并将其分配给对象的问题
- javascript - 函数返回承诺而不是值 - react-native / javascript