assertj-android icon indicating copy to clipboard operation
assertj-android copied to clipboard

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

Open ylogx opened this issue 10 years ago • 6 comments

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

ylogx avatar Nov 28 '15 06:11 ylogx

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

JakeWharton avatar Nov 28 '15 06:11 JakeWharton

Nope. I just added these as dependencies in gradle

ylogx avatar Nov 28 '15 09:11 ylogx

How? Show the dependency declarations.

On Sat, Nov 28, 2015, 4:57 AM Shubham Chaudhary [email protected] wrote:

Nope. I just added these as dependencies in gradle

— Reply to this email directly or view it on GitHub https://github.com/square/assertj-android/issues/180#issuecomment-160270737 .

JakeWharton avatar Nov 28 '15 18:11 JakeWharton

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

ylogx avatar Nov 29 '15 09:11 ylogx

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"
}

jdulaney avatar Dec 04 '15 18:12 jdulaney

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'

dadouf avatar Feb 15 '16 11:02 dadouf