Already solved this. It was problem with include in settings.gradle. 

More 
here: 
https://stackoverflow.com/questions/27180210/androidtestcompile-and-dependency-on-another-module-ends-with-classnotfoundexcep

Thanks Xavier for response 

On Tuesday, 2 December 2014 20:18:06 UTC+1, Xavier Ducrohet wrote:
>
> This should work, though if you are adding it to 'compile' then you don't 
> need to add it to 'androidTestCompile' too?
>
> On Thu, Nov 27, 2014 at 3:22 PM, Tomek Rozbicki <[email protected] 
> <javascript:>> wrote:
>
>> I'm trying to test some code that part of it comes from another module. 
>> All the test pass except these which are referencing classes from java 
>> module. I've this configuration but it doesn't work:
>>
>>     androidTestCompile(project(':common'))
>>     compile project(':common')
>>
>> java.lang.RuntimeException: java.lang.ClassNotFoundException: Class...
>> ...
>> at java.lang.reflect.Method.invokeNative(Native Method)
>> at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
>>
>> How to add another module classes to test apk?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "adt-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
> http://developer.android.com | http://tools.android.com
>
> Please do not send me questions directly. Thanks!
>  

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to