Android Can';t在Gradle中编译新材料库

Android Can';t在Gradle中编译新材料库,android,android-gradle-plugin,material-design,Android,Android Gradle Plugin,Material Design,我无法添加新材质设计库。 当我添加compile'com.google.android.material:material:1.0.0-alpha1'并同步该项目时,会出现以下两个错误: error: resource android:attr/fontVariationSettings not found. error: resource android:attr/ttcindex not found. 我的build.gradle: apply插件:“com.android.applica

我无法添加新材质设计库。 当我添加
compile'com.google.android.material:material:1.0.0-alpha1'
并同步该项目时,会出现以下两个错误:

error: resource android:attr/fontVariationSettings not found.
error: resource android:attr/ttcindex not found.
我的
build.gradle

apply插件:“com.android.application”
安卓{
编译DK27版
默认配置{
应用程序ID“rockthesport.com.pruebasmaterial”
明斯克版本19
targetSdkVersion 27
版本代码1
版本名称“1.0”
TestInstrumentRunner“android.support.test.runner.AndroidJUnitRunner”
}
建筑类型{
释放{
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard rules.pro'
}
}
}
依赖关系{
实现文件树(目录:“libs”,包括:['*.jar'])
实现'com.android.support:appcompat-v7:27.1.1'
实现'com.android.support.constraint:constraint布局:1.1.0'
编译'com.google.android.material:material:1.0.0-alpha1'
测试实现'junit:junit:4.12'
androidTestImplementation'com.android.support.test:runner:1.0.2'
androidTestImplementation'com.android.support.test.espresso:espresso核心:3.0.2'
}
有什么建议吗

谢谢

要使用新的
'com.google.android.material:material:1.0.0-alpha1'
您必须使用

android {
        compileSdkVersion 'android-P'

        defaultConfig {
            targetSdkVersion 'P'
        }
        ...
    }

发布你的版本。gradleBuild.gradle postedMaybe你应该看看这篇文章=>谢谢!成功了!按照这个答案寻找合适的解决方案