Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Warning assertj-android-appcompat-v7 depends on one or more Android Libraries but is a jar #180

Open
ylogx opened this issue Nov 28, 2015 · 6 comments

Comments

@ylogx
Copy link

ylogx commented Nov 28, 2015

I keep getting the following warning:

WARNING: Module 'com.squareup.assertj:assertj-android-design:1.1.1' depends on one or more Android Libraries but is a jar
WARNING: Module 'com.squareup.assertj:assertj-android-support-v4:1.1.1' depends on one or more Android Libraries but is a jar
WARNING: Module 'com.squareup.assertj:assertj-android-appcompat-v7:1.1.1' depends on one or more Android Libraries but is a jar
@JakeWharton
Copy link
Member

We ship aars. Are you explicitly depending on the jars?

@ylogx
Copy link
Author

ylogx commented Nov 28, 2015

Nope. I just added these as dependencies in gradle

@JakeWharton
Copy link
Member

How? Show the dependency declarations.

On Sat, Nov 28, 2015, 4:57 AM Shubham Chaudhary notifications@github.com
wrote:

Nope. I just added these as dependencies in gradle


Reply to this email directly or view it on GitHub
#180 (comment)
.

@ylogx
Copy link
Author

ylogx commented Nov 29, 2015

This is the combination that fails:

    testCompile 'com.squareup.assertj:assertj-android:1.1.1'
    testCompile 'com.squareup.assertj:assertj-android-design:1.1.1'
    testCompile 'com.squareup.assertj:assertj-android-appcompat-v7:1.1.1'
    testCompile 'com.squareup.assertj:assertj-android-support-v4:1.1.1'

Just tried to reproduce again. Same steps. Add all together. Just adding testCompile 'com.squareup.assertj:assertj-android:1.1.1' works like a charm

@jdulaney
Copy link

jdulaney commented Dec 4, 2015

I ran into the same issue. I solved it by doing the following:

testCompile("com.squareup.assertj:assertj-android:1.1.1") {
    exclude group: "com.android.support", module: "support-annotations"
    exclude group: "com.android.support", module: "support-v4"
}

testCompile("com.squareup.assertj:assertj-android-support-v4:1.1.1") {
    exclude group: "com.android.support", module: "support-annotations"
    exclude group: "com.android.support", module: "support-v4"
}

@dadouf
Copy link

dadouf commented Feb 15, 2016

I'm adding my two cents: I ran into a similar issue (same error message but with assertj-android-recyclerview-v7). I solved it by declaring my dependency with @aar, so:

testCompile 'com.squareup.assertj:assertj-android-recyclerview-v7:1.1.1@aar'

instead of

testCompile 'com.squareup.assertj:assertj-android-recyclerview-v7:1.1.1'

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

No branches or pull requests

4 participants