Sample Fuel request compilation errors

443 Views Asked by At

I intent to use the Fuel library inside an Android project.

I added the following to my Gradle file:

//core
implementation 'com.github.kittinunf.fuel:fuel:2.1.0'
//packages
implementation 'com.github.kittinunf.fuel:fuel-android:2.1.0'
implementation 'com.github.kittinunf.fuel:fuel-json:2.1.0'

It was succesfully resolved.

I copied the quick start code to a class, and when I try to compile, I get the following:

enter image description here

What else is required?

1

There are 1 best solutions below

1
On BEST ANSWER

Make sure you are importing:

import com.github.kittinunf.result.Result

Otherwise it tries to use Kotlin's Result class.