I use corda to in my project and I want to include Fuel. I add this to build.gradle
repositories {
jcenter()
}
dependencies {
compile 'com.github.kittinunf.fuel:fuel:<latest-version>' //for JVM
}
But when I invoke gradlew build in the terminal, errors come out
:compileKotlin FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not resolve com.github.kittinunf.fuel:fuel:<latest-version>.
Required by:
project :
> Could not resolve com.github.kittinunf.fuel:fuel:<latest-version>.
> Could not get resource 'https://jcenter.bintray.com/com/github/kittinunf/fuel/fuel/%3Clatest-version%3E/fuel-%3Clatest-version%3E.pom'.
> Could not GET 'https://jcenter.bintray.com/com/github/kittinunf/fuel/fuel/%3Clatest-version%3E/fuel-%3Clatest-version%3E.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve com.github.kittinunf.fuel:fuel:<latest-version>.
> Could not get resource 'https://repo1.maven.org/maven2/com/github/kittinunf/fuel/fuel/%3Clatest-version%3E/fuel-%3Clatest-version%3E.pom'.
> Could not GET 'https://repo1.maven.org/maven2/com/github/kittinunf/fuel/fuel/%3Clatest-version%3E/fuel-%3Clatest-version%3E.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve com.github.kittinunf.fuel:fuel:<latest-version>.
> Could not get resource 'https://dl.bintray.com/kotlin/exposed/com/github/kittinunf/fuel/fuel/%3Clatest-version%3E/fuel-%3Clatest-version%3E.pom'.
> Could not GET 'https://dl.bintray.com/kotlin/exposed/com/github/kittinunf/fuel/fuel/%3Clatest-version%3E/fuel-%3Clatest-version%3E.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve com.github.kittinunf.fuel:fuel:<latest-version>.
> Could not get resource 'https://jitpack.io/com/github/kittinunf/fuel/fuel/%3Clatest-version%3E/fuel-%3Clatest-version%3E.pom'.
> Could not GET 'https://jitpack.io/com/github/kittinunf/fuel/fuel/%3Clatest-version%3E/fuel-%3Clatest-version%3E.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Is it the right way to install Fuel by calling gradlew build?
Cannot figure out why. Any help is appreciate. Thank you
You just need to change in your Fuel dependencies <latest-version>for the latest library version number.
implementation 'com.github.kittinunf.fuel:fuel:1.12.0' //for JVM
@JairAviles Thanks for your reply. I tried this method but the error still here. I think it's maybe the firewall of corporation computer. Sad
Note: change all the dependencies' <latest-version> to the same version number of the Fuel lib (vs the latest versions of each target libraries). So at time of writing:
implementation 'com.github.kittinunf.fuel:fuel:1.13.0' //for JVM
implementation 'com.github.kittinunf.fuel:fuel-android:1.13.0' //for Android
implementation 'com.github.kittinunf.fuel:fuel-livedata:1.13.0' //for LiveData support
implementation 'com.github.kittinunf.fuel:fuel-rxjava:1.13.0' //for RxJava support
implementation 'com.github.kittinunf.fuel:fuel-coroutines:1.13.0' //for Kotlin Coroutines support
implementation 'com.github.kittinunf.fuel:fuel-gson:1.13.0' //for Gson support
implementation 'com.github.kittinunf.fuel:fuel-jackson:1.13.0' //for Jackson support
implementation 'com.github.kittinunf.fuel:fuel-moshi:1.13.0' //for Moshi support
implementation 'com.github.kittinunf.fuel:fuel-forge:1.13.0' //for Forge support
@jalakoo Thanks Jalakoo. The problem is solved
Most helpful comment
Note: change all the dependencies'
<latest-version>to the same version number of the Fuel lib (vs the latest versions of each target libraries). So at time of writing: