我正在 Android Studio 上构建一个登录注册应用程序。当我尝试导入包 android.support.design.widget 时,它无法识别它。我在其他帖子上搜索了解决方案,他们说在 build.gradle 上添加一些“编译”行。我做到了,但没有任何效果。
这是我的 build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.thomas.medicalappointmentorganization"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
}
我做错了什么?
最佳答案
请删除此行
implementation 'com.android.support:appcompat-v7:26.1.0'
关于android - 导入 android.support.design.widget.TextInputEditText 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47251214/