square/assertj-android

java.lang.NoSuchMethodError: org.assertj.core.api.AbstractCharSequenceAssert.doesNotContain(Ljava/lang/CharSequence;)

emartynov opened this issue · 4 comments

I've updated AssertJ core to 3.9.0 and I got one test failing:

        assertThat(viewHolder.date).containsText(" · " + context.getString(R.string.transactions__pending))

(where date it TextView)
with the message:

java.lang.NoSuchMethodError: org.assertj.core.api.AbstractCharSequenceAssert.doesNotContain(Ljava/lang/CharSequence;)Lorg/assertj/core/api/AbstractCharSequenceAssert;

	at org.assertj.android.api.widget.AbstractTextViewAssert.doesNotContainText(AbstractTextViewAssert.java:601)

I temporarily fixed it but would be nice to update AssertJ core dependency.

Yes, It requires Java 8. We use it with Robolectric.

Should AGP 3.0 modify Java8 bytecode for libraries as well?

Clear. I'm closing the issue now. And thinking about a possible solution like having another artefact that fully compatible with Java8.