Post the relevant excerpt of your build file. Which dependencies are you declaring, specifically, and what errors messages are you getting, specifically?
Note that android.support.design.widget.Snackbar is pre-AndroidX - is that the platform you are targeting? Any project started now should be targeting AndroidX, which uses different packages. If you're not targeting AndroidX, "implementation 'com.android.support:design:28.0.+'" would be the dependency you need (plus some other support libraries).
https://stackoverflow.com/questions/52668349/how-to-use-a-snackbar-with-androidx should also be helpful.