Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid instrumentation testing : IllegalAccessError
    text
    copied!<p>I am getting the IllegalAccessError while running Android instrumentation tests. <br>This is Logcat output:</p> <pre><code>java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation </code></pre> <p>This is my setup: <br><code>TestProject</code> tests <code>UnderTestProject</code>, which includes <code>AnotherProject</code> in the buildpath (in 'Projects' tab), and exports it from 'Order and Export' tab. The class under test belongs to <code>AnotherProject</code>.</p> <p>I have followed the suggestion in <a href="https://stackoverflow.com/questions/2431457/why-do-i-get-a-illegal-access-error-when-running-my-android-tests">this stackoverflow question</a> here for configuring build path.</p> <p>The builds are being done using Maven, from command line. <code>AnotherProject</code> is in the pom file for both <code>TestProject</code> and <code>UnderTestProject</code>, as dependency. Is this the reason for still getting the error? How can I fix this? Include <code>AnotherProject</code> in pom only for <code>UnderTestProject</code> and include <code>UnderTestProject</code> in the <code>TestProject</code>'s pom?</p> <p>How does eclipse's build path tie up with maven's pom? </p> <p>I am not clear about this, and any help would be greatly appreciated.</p> <p>Thanks! </p> <hr> <p>I tried the following, and still getting the problem:</p> <ol> <li>Removed <code>AnotherProject</code> from <code>TestProject</code>'s pom, and added <code>UnderTestProject</code> to it. </li> <li>Followed the advice on <a href="http://code.google.com/p/maven-android-plugin/issues/detail?can=2&amp;start=0&amp;num=100&amp;q=&amp;colspec=ID%20Type%20Component%20OpSys%20Status%20Priority%20Milestone%20Owner%20Summary&amp;groupby=&amp;sort=&amp;id=142" rel="nofollow noreferrer">this thread.</a> My <code>UnderTestProject</code> doesn't even build if I add <code>&lt;scope&gt;provided&lt;/scope&gt;</code> for <code>AnotherProject</code>.</li> </ol> <p>I am stuck at this point, please let me know if you have a way out.</p> <p>thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload