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

Instead of:

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

Use:

   implementation group: 'com.google.android.material', name: 'material', version: '1.1.0-alpha05'

And it works.


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.


FOR ANDROIDX USERS.
You can implement as follows...

AndroidX
implementation 'com.google.android.material:material:1.0.0-alpha3'

Old build artifact users can use the following implementation
implementation 'com.android.support:design:[Enter Design library version here]'

*use that version without square brackets.
you can find design library version via this link : https://mvnrepository.com/artifact/com.android.support/design/28.0.0-alpha1

Tags:

Android

Gradle