This week's book giveaway is in the Spring forum.
We're giving away four copies of Java Persistence with Spring Data and Hibernate and have Cătălin Tudose on-line!
See this thread for details.
Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

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.
 
Bartender
Posts: 7488
171
  • 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
Bartender
Posts: 7488
171
  • 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.
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic