Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:09:22+00:00 2026-05-29T21:09:22+00:00

I am getting the IllegalAccessError while running Android instrumentation tests. This is Logcat output:

  • 0

I am getting the IllegalAccessError while running Android instrumentation tests.

This is Logcat output:

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

This is my setup:

TestProject tests UnderTestProject, which includes AnotherProject in the buildpath (in ‘Projects’ tab), and exports it from ‘Order and Export’ tab. The class under test belongs to AnotherProject.

I have followed the suggestion in this stackoverflow question here for configuring build path.

The builds are being done using Maven, from command line. AnotherProject is in the pom file for both TestProject and UnderTestProject, as dependency. Is this the reason for still getting the error? How can I fix this? Include AnotherProject in pom only for UnderTestProject and include UnderTestProject in the TestProject‘s pom?

How does eclipse’s build path tie up with maven’s pom?

I am not clear about this, and any help would be greatly appreciated.

Thanks!


I tried the following, and still getting the problem:

  1. Removed AnotherProject from TestProject‘s pom, and added UnderTestProject to it.
  2. Followed the advice on this thread. My UnderTestProject doesn’t even build if I add <scope>provided</scope> for AnotherProject.

I am stuck at this point, please let me know if you have a way out.

thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:09:24+00:00Added an answer on May 29, 2026 at 9:09 pm

    First, follow the Libraries section on android-maven-plugin wiki page here:

    If your project set-up contains libraries then those too need to be added as <scope>provided</scope> otherwise they will be added to the test which will result in a duplication the error «Class ref in pre-verified class resolved to unexpected implementation».

    … …

    Note Bug # 142, only Libraries with <packaging>jar</packaging> will work at this point.

    Then right-click on your UnderTestProject, click Build Path -> Configure Build Path, tick Maven Dependencies in the Order and Export tab:enter image description here

    This works for me, hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting this error: java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:200) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
Getting output with Java is pretty easy as you can make use of System.out.print
Getting this error while trying to erase the last element of a list. I
Getting ORA-00918: column ambiguously defined: running this SQL: SELECT * FROM (SELECT DISTINCT(coaches.id), people.*,
Getting an error running a Android unit test which extends ActivityInstrumentationTestCase2, and so want
Getting java.lang.RuntimeException: Failure delivering result ResultInfo from a NPE apparently resulting from a call
Getting an error if using Apache Commons Validator: java.lang.NoClassDefFoundError: org/apache/oro/text/perl/Perl5Util Even if, Apache Commons
Getting this error while I am trying to run /compile/build a Proiject Incompatible Types
getting this error while linking an app, some one an idea? ld: duplicate symbol
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.