I found a dependency that i thought might help me, and it looked promising.[enter image description here][1] But when i try to implement it I get a "Failed to resolve: com.hootsuite.android:nachos:1.1.1" :
https://i.stack.imgur.com/qgbEx.png
And the thing I'm trying to accomplish is this:
https://i.stack.imgur.com/d2JaU.png
as seen in this video : https://www.youtube.com/watch?v=UCZeHeDDBMw&list=PLi_3BTX1-5i4ieQOm-W-i3rkOU3qOA06o&index=3&t=401s&ab_channel=AndroidRion
CodePudding user response:
Gradle's failing to resolve that dependency for some reason. First thing you should check is if there's a site for that library, or an entry in the repositories you're using, to check if that's a valid version or if there's anything else you need to know.
Turns out it has a project repository on Github, so there's a readme telling you how to install it:
Add this line to your project level build.gradle:
buildscript { repositories { jcenter() }
Add this line to your module level build.gradle:
dependencies { implementation "com.hootsuite.android:nachos:1.1.1" }
But in this case that won't help - JCenter shut down last year. The last update to this project was 4 years ago - but they have a JitPack link at the top of the readme. JitPack is basically a way to add dependencies from Github repositories, when they're not in a central repository like the Google one, or Maven Central. So try adding the config stuff at that JitPack link if you want to use this library (you could also build it locally if you really wanted)
That said, Chip
s are part of the Material Components library now, so you might want to just use that instead - it's basically part of a typical Android app at this point. Scroll down to the Standalone ChipDrawable
section to see how you can add one to a TextView
CodePudding user response:
You can follow this answer. It shows you all the details to set chips in edit text.