Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unresolved reference: github, when trying to import Fuel library in Kotlin

I am new to Kotlin so apologies if I am missing something simple here.

I am trying to import the Fuel libraries into my project, I have added the below into my Gradle which appears to sync fine

implementation 'com.github.kittinunf.fuel:fuel:<latest-version>'
implementation 'com.github.kittinunf.fuel:<package>:<latest-version>'

However, when I try to import this into my activity as below:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

import com.github.kittinunf.fuel.httpGet
import com.github.kittinunf.result.Result

‘github’ becomes highlighted in red, and the error below is shown:

Unresolved reference: github

As such I am unable to access the library, just wondering if I am missing something here in order to get this to work ? I have been able to import other libraries into my project successfully, so wondering if it is something specific to this implementation I am missing. Hoping somebody could kindly assist.

>Solution :

I hope you are not using the dependencies you mentioned with the <latest-version> or <package> tags. These are meant to be replaced with actual version numbers/packages of the artifact, like this:

implementation "com.github.kittinunf.fuel:fuel:2.3.1"
implementation "com.github.kittinunf.fuel:fuel-coroutines:2.3.1"

If you don’t have this issue, then I would recommend invalidating Gradle caches, restarting your IDE, and building from scratch for one more time. You can do that via the CLI too:

$ ./gradlew build
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading