Using external library with JUnit on android

java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation

http://groups.google.co.jp/group/android-developers/browse_thread/thread/eb4ada05c7e61686

On 10月23日, 午後6:11, Clément Plantier wrote:
> Hi,
>
> I'm having troubles with ADT and JUnit Testing.
>
> When I use HttpClient classes, my JUnit tests fail with errors like:
> java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient.
>
> I run my tests in Eclipse as "JUnit Tests" (not "Android JUnit Tests")
> with the "Android Test Launcher".
> An idea about how to resolve this problem?

On 10月24日, 午前10:09, Brett Chabot wrote:
> Run your tests as AndroidJUnittests.
>
> You can only run tests asJUnittests if they do not reference any
> classes from within android.jar.

Leave a Reply