android - 导入 android.support.design.widget.TextInputEditText 失败

标签 android importerror

我正在 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/

相关文章:

python - 为什么此导入序列会生成错误?

python - Pynotify 搞砸了日期时间,为什么?

java - onLowMemory 事件测试

android - TableRow 的列改变了它的大小

android - 边距/填充缩小 ImageView

python - 在 mac 上使用 python 安装 lxml

android - 如何将额外内容从 Intent 传递到 onActivityResult() 方法?

java - 在 Google map 上绘制自定义 map 图 block 图像 (.pngs) - Android

Python 模块导入因未知原因失败

python - ImportError:使用LXML时权限被拒绝