I have a problem executing android unit tests against android applications that utilize the recently released Fragment support API. When the test is run against a FragmentAc
For any IntelliJ users who run into this problem the equivalent fix is to set the scope of your dependency to 'Provided' as follows:
File > Project Structure > Modules > [select your test app] > dependencies tab > select 'Provided' in scope drop down.
I spent half the night on this, and finally found a solution. The key line is:
04-05 18:00:11.276, (Lcom/example/android/app/FragmentLayoutSupport; had used a different Landroid/support/v4/app/FragmentActivity; during pre-verification).
The problem is that the android-support-v4.jar which you are using in your test project is different from that one in your application project. Remove all of the references to android-support-v4.jar from your test project. Then go to your application project Properties->Java Build Path->Order and Export and check android-support-v4.jar to export it. Now both projects will be using the same library, and dalvik won't complain.
The IntelliJ answer by Rupert didn't get me all the way there. I solved this by exporting the jar like the Eclipse answer suggested.
File > Project Structure > Modules > [select your main app] > dependencies tab > click export check box next to the support jar