powermock and androidTest

377 views
Skip to first unread message

nikhilesh singh Tak

unread,
Mar 17, 2016, 2:26:30 PM3/17/16
to PowerMock
Hello Group,

I integrated powermock to write test cases for my android app.

Dependencies added in the gradle file are :
    
    androidTestCompile 'junit:junit:4.12'
    androidTestCompile 'org.mockito:mockito-core:2.0.5-beta'
    androidTestCompile ('org.powermock:powermock-api-mockito:1.6.2') {
        exclude module: 'hamcrest-core'
        exclude module: 'objenesis'
    }
    androidTestCompile ('org.powermock:powermock-module-junit4:1.6.2') {
        exclude module: 'hamcrest-core'
        exclude module: 'objenesis'
    }

but when I run the test cases I am getting error:
"com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/hamcrest/BaseDescription.class"

Thanks in advance.

Arthur Zagretdinov

unread,
Mar 18, 2016, 4:11:12 PM3/18/16
to powe...@googlegroups.com
Hello, 

Unfortunately, neither John nor I not an Android Developer so we cannot help you with this issue :( PowerMock wasn’t design to use with Android, but we have a lot question about using PowerMock + Android. About month ago was same or looks like as your issue:


Maybe it could help you. 

Best regrads,
Arthur Zagretdinov
--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powermock+...@googlegroups.com.
To post to this group, send email to powe...@googlegroups.com.
Visit this group at https://groups.google.com/group/powermock.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages