Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error:(1, 0) You appear to have guava-jdk5 on your project buildScript or buildSrc classpath. This is likely a transitive dependency of another gradle plugin.Run the buildEnvironment task to find out more. See https://issuetracker.google.com/38419426#comment8 for a workaround. #145

Closed
yevhenpashutin opened this issue Jan 11, 2018 · 1 comment
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@yevhenpashutin
Copy link

yevhenpashutin commented Jan 11, 2018

I get this error:
Error:(1, 0) You appear to have guava-jdk5 on your project buildScript or buildSrc classpath.
This is likely a transitive dependency of another gradle plugin.Run the buildEnvironment task to find out more.
See https://issuetracker.google.com/38419426#comment8 for a workaround.
Open File

My build.gradle is:

apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'com.google.firebase.firebase-crash'
apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.digitaldna.courier"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 3
        versionName "1.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    signingConfigs {
        debug {
            storeFile file("./debug.keystore")
            storePassword "android"
            keyAlias "androiddebugkey"
            keyPassword "android"
        }

        release {
            storeFile file("./debug.keystore")
            storePassword "android"
            keyAlias "androiddebugkey"
            keyPassword "android"
        }
    }

    buildTypes {
        debug {
            applicationIdSuffix ".debug"
            minifyEnabled false
            debuggable true
            signingConfig signingConfigs.debug
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField "String", "ENDPOINT", '"https://beta-api.1temiz.com"'
        }

        stage {
            applicationIdSuffix ".stage"
            minifyEnabled false
            debuggable true
            signingConfig signingConfigs.debug
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField "String", "ENDPOINT", '"https://api.1temiz.com"'
        }

        release {
            applicationIdSuffix ".prod"
            minifyEnabled true
            debuggable false
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField "String", "ENDPOINT", '"https://api.1temiz.com"'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    // for jenkins
    packagingOptions {
        exclude 'META-INF/NOTICE' // It is not include NOTICE file
        exclude 'META-INF/LICENSE' // It is not include LICENSE file
    }

    // for jenkins
    lintOptions {
        abortOnError false
    }
}

dependencies {
    def supportLibraryVersion = "25.2.0"
    def retrofitVersion = "2.1.0"
    def playService = '10.2.0'
    def jacksonVersion = "2.8.6"

    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'

    // support library
    compile "com.android.support:appcompat-v7:$supportLibraryVersion"
    compile "com.android.support:design:$supportLibraryVersion"
    compile "com.android.support:support-v4:$supportLibraryVersion"
    compile "com.android.support:cardview-v7:$supportLibraryVersion"

    // retrofit
    compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
    compile "com.squareup.retrofit2:converter-jackson:$retrofitVersion"
    compile "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion"

    // Jackson
    compile "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
    compile "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion"
    compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"

    compile 'com.squareup.okhttp3:logging-interceptor:3.3.0'

    // rxjava
    compile 'io.reactivex:rxjava:1.1.6'
    compile 'io.reactivex:rxandroid:1.2.1'
    compile 'com.artemzin.rxjava:proguard-rules:1.1.0.0'

    // glide
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'jp.wasabeef:glide-transformations:2.0.1'

    // play services
    compile "com.google.android.gms:play-services-base:$playService"
    compile "com.google.android.gms:play-services-location:$playService"

    //firebase
    compile "com.google.firebase:firebase-core:$playService"
    compile "com.google.firebase:firebase-crash:$playService"
    compile "com.google.firebase:firebase-messaging:$playService"
    compile "com.google.firebase:firebase-appindexing:$playService"
    compile 'com.firebase:firebase-jobdispatcher:0.5.2'


    // multidex
    compile 'com.android.support:multidex:1.0.1'

    // stetho
    compile 'com.facebook.stetho:stetho:1.4.2'

    // google maps
    compile "com.google.android.gms:play-services-maps:$playService"

    //sticky header
    compile 'org.zakariya.stickyheaders:stickyheaders:0.7.6'

    // bootstrap includes
    compile project(path: ':core')
    compile project(path: ':mvp-loader')
    compile project(path: ':permissionmanager')
    compile project(path: ':validators')
    compile project(path: ':database')


    compile project(path: ':passwordindicator')
    compile project(path: ':orderstatus')
    compile project(path: ':notificationscount')
    compile project(path: ':lineweekchart')
    compile project(path: ':numbercircle')
}

apply plugin: 'com.google.gms.google-services'

There is https://stackoverflow.com/questions/47262150/commanderror-you-appear-to-have-guava-jdk5-on-your-project-buildscript-or-build
but its resolution doesn't work for me, I have "no classpath ('com.google.firebase:firebase-plugins:1.0.5') " to add "exclude group"
PLEASE HELP how to fix it.

@JustinBeckwith JustinBeckwith added 🚨 This issue needs some love. triage me I really want to be triaged. labels Jun 8, 2018
@JustinBeckwith JustinBeckwith added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Jun 20, 2018
@chingor13
Copy link
Contributor

Sorry for the delay in getting to this.

This library resolved that dependency issue in #69, but google-api-client has not yet released a version to fix this merged, but unreleased PR.

You are getting this message because one of your dependencies (or its dependencies) has a dependency on google-api-client. You should be able to either determine which of your declared dependencies requires guava-jdk5 by running gradle dependencies.

As a workaround, you should be able to add the classpath config for google-api-client:

dependencies {
  // ...your declared dependencies
  classpath('com.google.app_client:google-api-client:[your-version]') {
    exclude group: 'com.google.guava', module: 'guava-jdk5' 
  }
}

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants