Mockito + Dexmaker on Android

前端 未结 7 547
余生分开走
余生分开走 2020-12-05 09:42

I am trying to use Mockito in my Android project. I have found very nice tutorial that deals with it: http://www.paulbutcher.com/2012/05/mockito-on-android-step-by-step/

相关标签:
7条回答
  • 2020-12-05 10:29

    I had this issue for an Android Library project but NOT for the application project! Setting the System property "dexmaker.dexcache" as mentioned above worked around the issue. I'm running Android 4.3 Nexus 4 device, building with 19.0.3 tools, target api 19, my dependencies:

    androidTestCompile "org.mockito:mockito-core:1.9.5"
    androidTestCompile "com.google.dexmaker:dexmaker:1.0"
    androidTestCompile "com.google.dexmaker:dexmaker-mockito:1.0"
    
    0 讨论(0)
提交回复
热议问题