Tony Sherman
Tony Sherman

Reputation: 295

Gradle Unable to resolve dependency for ':app@debug/compileClasspath':

Per the documentation on GitHub my build.gradle(app) is:

repositories {
    jcenter()
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.dubsmash.volley:library:2.0.1'
    compile 'ca.mimic:oauth2library:2.3.0'
    compile 'com.github.kittinunf.fuel:fuel:<latest-version>' //for JVM
    compile 'com.github.kittinunf.fuel:fuel-android:<latest-version>' //for Android
    compile 'com.github.kittinunf.fuel:fuel-livedata:<latest-version>' //for LiveData support
    compile 'com.github.kittinunf.fuel:fuel-rxjava:<latest-version>' //for RxJava support
    compile 'com.github.kittinunf.fuel:fuel-gson:<latest-version>' //for Gson support
    compile 'com.github.kittinunf.fuel:fuel-jackson:<latest-version>' //for Jackson support
}

And when I try to build Gradle throws the following error for all the fuel components:

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.kittinunf.fuel:fuel-livedata:<latest-version>.

Could not resolve com.github.kittinunf.fuel:fuel-livedata:<latest-version>.
Required by:
    project :app
 > No cached version of com.github.kittinunf.fuel:fuel-livedata:<latest-version> available for offline mode.

Upvotes: 0

Views: 6341

Answers (1)

Moonbloom
Moonbloom

Reputation: 7918

You can't actually write "<latest-version>" in a gradle compile block.

You have to substitute it for the version number.

So it'd be something like:

compile 'com.github.kittinunf.fuel:fuel:2.2.0'

Again, substitute the version number for the version you want.

Upvotes: 5

Related Questions