dacongy / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
0 stars 0 forks source link

IncompatibleClassChangeError when using espresso-contrib #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a project using RecyclerView
2. Include espresso-core
3. Run tests, be happy
4. Include espresso-contrib
5. Run tests, get java.lang.IncompatibleClassChangeError

To make it easier to run, I created a blank project with a RecyclerView and a 
commit that only adds espresso-contrib. 
https://github.com/seppo0010/EspressoTest

What is the expected output? What do you see instead?

Getting thrown an exception java.lang.IncompatibleClassChangeError when trying 
to set an adapter for a RecyclerView.

> Incompatible structural change detected: Structural change of 
android.support.v7.widget.RecyclerView$Adapter is hazardous 
(/data/dalvik-cache/x86/data@app@seppo0010.espressot
est-2@base.apk@classes.dex at compile time, 
/data/dalvik-cache/x86/data@app@seppo0010.espressotest.test-2@base.apk@classes.d
ex at runtime): Virtual method count off: 26 vs 25

The offending method seems to be `onFailedToRecycleView` which was added to 
Android on November.

Full output: https://gist.github.com/seppo0010/4eeed06cbe5de42e90fb

Commit adding the method to Android: 
https://android.googlesource.com/platform/frameworks/support/+/e2437126f02251358
91544315ff72e54c7de0f59

Original issue reported on code.google.com by seppo0010 on 23 Mar 2015 at 6:44

GoogleCodeExporter commented 9 years ago
s/using/using\ espresso-contrib in the title. I seem to be unable to edit it.

Original comment by seppo0010 on 23 Mar 2015 at 6:49

GoogleCodeExporter commented 9 years ago

Original comment by vale...@google.com on 30 Mar 2015 at 8:48

GoogleCodeExporter commented 9 years ago
This is happening because espresso's deps on support libs are out of date. Will 
be fixed in the coming release.

Original comment by vale...@google.com on 2 Apr 2015 at 10:16