import android.support.design.widget.TextInputEditText Faile



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

使用这个:

implementation 'com.google.android.material:material:1.4.0'

而不是:

compile 'com.android.support:design:26.1.0'

相关内容

  • 没有找到相关文章

最新更新