java - Runtime error PowerMock + Mockito: ProxyFrameworkImpl could not be located in classpath -
i trying use powermock android instrumenttestcase since test runs on android device libraries needs added apk.
i encounter big issues powermock+mockito , dex files. have runtime error powermock+mockito in dependencies:
org.powermock.api.extension.proxyframework.proxyframeworkimpl not located in classpath.
and compilation error if include either cglib/cglib-nodep (has suggested in answers):
com.android.dex.dexexception: multiple dex files define lnet/sf/cglib/beans/beancopier$beancopierkey
here part of gradle.build:
androidtestcompile 'com.android.support.test:runner:0.3' androidtestcompile 'org.powermock:powermock-api-mockito:1.6.4' androidtestcompile 'org.powermock:powermock-module-junit4:1.6.4' androidtestcompile 'cglib:cglib-nodep:3.2.0' androidtestcompile 'cglib:cglib:3.2.0'
what missing ?
thanks in advance!
i tried use powermock android instrumentation tests , got stuck same issue.
here i've found on powermock github
powermock won't work on android if run on device since powermock using jvm byte code manipulation. work if run on jvm though.
so, guess powermock appropriate unit testing on android.
Comments
Post a Comment