android - Instrumentation run failed due to 'java.lang.IllegalAccessError' in Robotium test project with actionbar sherlock -


i've added actionbarsherlock dependency robotium test project ... , each time try run tests, below error occurs
test run failed: instrumentation run failed due 'java.lang.illegalaccesserror'

any ?!

i faced similar issues during instrumentation got error class ref in pre-verified class resolved unexpected implementation

after log of struggle , solve problem . problem occurred due android-support-v4.jar. jar default created in lib folder of android project. jars added lib folder used during compilation time runtime instrumentation project. when running instrumentation, target application started using android-support-v4.jar bundled in instrumentation project instead of own android-support-v4.jar. causes pre-verified class exception during runtime (as version differ).

to solve issue moved out android-support-v4.jar out of lib folder , put in different folder (say libforcompile) , add external jar (project properties -> java build path --> libraries --> click on add external jars).

thus instrumentation project compiled fine , when ran used android-support-v4.jar of target app itself

no more error..

i hope helps

regards indraneel


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -