• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Integrating Snackbar

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use Android Studio with Gradle. My task is to implement Snackbar. https://material.io/components/snackbars
I have problem to integrate/import relevant library. There are some hints (for example: https://stackoverflow.com/questions/34263418/cant-find-android-support-design-widget-snackbar-in-support-design-library/59115576)
However  neither suggested Gradle command in dependencies nor import (in Java code) works.
I will any hint how to make it work.
 
Saloon Keeper
Posts: 7573
176
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Igor Janick
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for example:

is not accepted by Gradle
 
Tim Moores
Saloon Keeper
Posts: 7573
176
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Igor Janick wrote:is not accepted by Gradle


What does that mean?

Are the relevant repositories correctly included in the build file? This would be the overall build file, not the module build file.

Tim wrote:what errors messages are you getting, specifically?

 
Igor Janick
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Gradle marked it with red.
However it seems this particular problem has been solved. The entire project has been updated to AndroidX  and I do not need to struggle with the Gradle.
I am very grateful fo help.
reply
    Bookmark Topic Watch Topic
  • New Topic