Failed to resolve: com.google.android.material:material:1.0.0-alpha1

前端 未结 6 1993
暗喜
暗喜 2020-12-17 08:36

So I\'m following the official documentation to add the Material Components library to my project https://github.com/material-components/material-components-android/blob/mas

6条回答
  •  有刺的猬
    2020-12-17 09:14

    Thought I'd share what fixed this for me now that I|O has started.

    I had about the same initial setup as you. To get it working I had to change the following:

    • compileSdkVersion to 'android-P'
    • Support Libraries to '28.0.0-alpha1'
    • include api 'com.android.support:design:28.0.0-alpha1' in the dependencies block.
    • SDK Platform update - Android P Preview (latest)
    • targetSdkVersion 'P'

    I then did the ritualistic 'Invalidate Caches / Restart' and rebuilt the project for good measure.

提交回复
热议问题