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

Module depends on one or more Android Libraries but is a jar #6

Open
kanetik opened this issue Jan 9, 2016 · 5 comments
Open

Module depends on one or more Android Libraries but is a jar #6

kanetik opened this issue Jan 9, 2016 · 5 comments

Comments

@kanetik
Copy link

kanetik commented Jan 9, 2016

When I add timber-loggly as a dependency in my Gradle file, I get 2 warnings:

Warning:Module 'com.github.tony19:timber-loggly:1.0.1' depends on one or more Android Libraries but is a jar
Warning:Module 'com.github.tony19:loggly-client:1.0.3' depends on one or more Android Libraries but is a jar

The modules don't download, and so I am unable to use this library at all.

I'm using Android Studio 2.0 Preview 4, and the related dependencies I'm referencing are:

compile 'com.android.support:support-v4:23.1.1'
compile 'com.jakewharton.timber:timber:4.1.0'
compile 'com.github.tony19:timber-loggly:1.0.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'

A quick Googling leads me to believe v4:23.1.1 of the support library is the problem, but I can't downgrade to an older version.

@ghost
Copy link

ghost commented Apr 15, 2016

Same issue here... did you find any solution by the time ?

@ghost
Copy link

ghost commented Apr 15, 2016

Maybe a workaround is to implement this lib : https://github.com/inrista/loggliest

@tony19
Copy link
Contributor

tony19 commented Apr 15, 2016

I believe this is caused by loggly-client's dependency on com.jakewharton.timber:timber, which turns out to be unnecessary for that library. The current workaround is to exclude it in your app's build.gradle as follows:

dependencies {
    compile ('com.github.tony19:timber-loggly:1.0.1') {
        exclude group:'com.jakewharton.timber', module:'timber'
    }
}

@ghost
Copy link

ghost commented Apr 15, 2016

You're right, no more error with this fix ! Thanks a lot !
However please note :

With this method, we consider importing Timber on a separate import statement.
But there is a side-effect : Timber.plant(new LogglyTree(LOGGLY_TOKEN)); does not work anymore...

The fix : removing the exclude method as mentionned in tony19's answer, and removing the Timber separate import (as it will be imported with timber-loggly)... Then now it works... but you will lose all the Timber subclasses you may have done before...

@ssawchenko
Copy link

I am also still seeing the above issue where I can no longer use LogglyTree when I exclude the timber module. Any chance of this library being updated to support newer Timber versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants