Failed to resolve: com.osbcp.cssparser:cssparser:1.5 HtmlSpanner-NightWhistler - android

I integrated HtmlSpanner into my Android application. I'm getting the following error:
Failed to resolve: com.osbcp.cssparser:cssparser:1.5.
How do I solve this error?
Thanks for help

This library is not in the standard Maven repository, that Gradle uses to resolve dependencies.
You should add the following repository address to your build.gradle file:
repositories {
mavenCentral()
maven {
url "http://repo.pageturner-reader.org"
}
}

If somebody is still looking, this lib or its analogue is in
maven repo
So you can just add dependency to build.gradle:
implementation 'com.osbcp:cssparser:1.7'
If you also need HTMLCleaner dependency, you can also find it in the standard repo
And add as a dependency to build.gradle like this:
implementation 'net.sourceforge.htmlcleaner:htmlcleaner:2.26'

Related

Android dependency not working

I'm trying to use the binance Java API. When I add:
Implementation: 'com. binance.api: binance-api-client: 1.0.0'
to the dependendencies and sync it, I get an error saying
Failed to resolve: com.binance.api:binance-api-client:1.0.0
I also tried the following:
Implementation: 'com. binance.api: binance-api-client:+'
which didn't work either.
What am I doing wrong and how can I fix it?
Unfortunately, the github owner didn't create a maven release yet. So, you need to depends on jitpack.io.
Modify your root build.gradle to contains maven jitpack.io like this:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
then add the dependency:
implementation 'com.github.binance-exchange:binance-java-api:69f56f5fcf'
You can take a look at https://jitpack.io/#binance-exchange/binance-java-api

Unable to use JitPack repository - Android

All day I'm trying to add my Android library to Github with JitPack.
I did everything described on: https://jitpack.io/docs/ANDROID/, with no success.
The problem is, when i try to build project, Android Studio give me message:
Error:(47, 13) Failed to resolve: com.github.linean:btleuart:v1.0.0
Here is my repo: https://github.com/linean/btleuart
If anyone have any idea what should I check please tell me.
Sorry for my english :)
The release "v1.0.0" does not exist. The release name is "1.0.0". So, in your app or library gradle file, replace
compile 'com.github.linean:btleuart:v1.0.0'
by
compile 'com.github.linean:btleuart:1.0.0'
In addition, make sure that you have included JitPack repo in your root gradle file.
allprojects {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
}
You can read some examples describing how to use JitPack to include libraries in your projects
I found solution !
Clean project
use /.gradlew build
use /.gradlew install
Compille project
Git - and now its working
Thanks cricket_007 for info about JitPack build log :)
main build.gradle file should have this:
allprojects {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
}
you can check a working example here: https://github.com/matoelorriaga/pokemon-mvp/blob/master/build.gradle

Gradle #aar dependency resolution in react-native project

I'm using an #aar dependency with transitive=true in build.gradle. It's downloaded to the gradle cache, but isn't resolved while the app is being compiled.
It may or may not be relevant, but I'm using it in a react-native app. The other dependencies in the build are compiled without a problem.
Does anyone have experience dealing with this type of issue?
I figured out that it was a react-native issue. If you are loading a #aar dependency in a package you also need to declare it as a repository in
android/build.gradle
in the block
allprojects {
repositories {
mavenLocal()
jcenter()
DESIRED_REMOTE_REPO_HERE
}
}

Android Studio : Failed to resolve <github dependency>

Let me first start of by saying that I just recently migrated to Android Studio and being totally honest I didn't like it. Now there is this git I am trying to import into my project - https://github.com/ongakuer/CircleIndicator
Although the compile statement which the owner has asked to put creates the error.
I added it into the dependency{} in my build.gradle file.
compile 'me.relex:circleindicator:1.1.5#aar'
Failed to resolve: me.relex:circleindicator:1.1.5#aar
You probably had forgotten this line under your gradle :
allprojects {
repositories {
jcenter()
}
}
Edit the root gradle located in root/build.gradle
I'll just explain a little :
When you add this line : compile 'repository or jar url', it prompts your gradle that it should find the repository (or the jar) and add it to your source.
But where should it search for this particular repository ? That is the purpose of this line, to declare a location from where the gradle should search from. In most of the cases it is - jcenter
(see this link)
Just open build.gradle(Module:app) and copy pase on your dependencies
dependencies {
compile 'me.relex:circleindicator:1.1.5#aar'
}

Github Project not available on android studio

I forked a project and I made a little modification on https://github.com/oursgris/datetimepicker
How can I make it available in android studio ?
I tryied to add in build.gradle :
dependencies {
compile 'com.github.oursgris.datetimepicker:library:0.0.3'
}
I had an error : Failed to resolve: com.github.oursgris.datetimepicker:library:0.0.3
What did I missed ?
I manage to output aar file but I don't know how to make it available in android studio with a simple dependancy (like other projects)
Regards
You almost got it right. What was missing is that you need to add a repository that stores your 'aar' file. You can do this with JitPack:
repositories {
maven {
url "https://jitpack.io"
}
}
And then add your library as:
dependencies {
compile 'com.github.oursgris:datetimepicker:0.0.3'
}

Categories

Resources