我尝试了之前在堆栈溢出中给出的解决方案以解决此问题,但是它没有用...我试图将TextInputLayout用于浮动标签,所以我在gradle文件中尝试了此代码
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.adroid.support:support-core-utils:28.0.0'
implementation 'com.android.support.design:28.0.0'
}
并将此代码段添加到build.gradle(project)..
allprojects {
repositories {
google()
jcenter()
maven{
url "https://maven.google.com"
}
}
}
但是我遇到错误,无法解决com.android.support.design 我什至尝试了版本26和25 ... 可能是什么问题?以及我该如何解决?
答案 0 :(得分:0)
更改它:
implementation 'com.android.support.design:28.0.0'
:
implementation 'com.android.support:design:28.0.0'
,然后重试