'Difference between 'com.google.android.material:material:1.6.0' and implementation 'androidx.compose.material:material:1.1.1'

What is the difference between these 2 implementations in the build.gradle dependencies file? Do they both need to be in my Jetpack Compose project if I want to use the Theme.Material3.DayNight theme?

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

and

implementation 'androidx.compose.material:material:1.1.1'


Solution 1:[1]

The first one is the implementation of Material Components for the Android UI based on View System (which uses subclasses of View class, layouts, etc).

https://github.com/material-components/material-components-android

The second one is the Material Components implementation for Jetpack Compose.

https://developer.android.com/jetpack/androidx/releases/compose-material

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 nglauber