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

  • SEARCH
  • Home
  • 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 8494415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:17:34+00:00 2026-06-10T23:17:34+00:00

I added ViewPagerIndicator to my project (it’s an Android library project), and my tests

  • 0

I added ViewPagerIndicator to my project (it’s an Android library project), and my tests work fine from IntelliJ, but fail when I run them from ANT. To be clear, only the test that is referencing classes from this Android Library project is failing, the rest are passing without any issue. I’m guessing something isn’t right in my build.xml? Anyone else run into this?

Here’s the stack trace:

java.lang.NoClassDefFoundError:
Lcom/viewpagerindicator/CirclePageIndicator;
com.google.inject.internal.util.$ComputationException:
java.lang.NoClassDefFoundError:
Lcom/viewpagerindicator/CirclePageIndicator; at
com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
at
com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
at
com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at
com.google.inject.internal.FailableCache.get(FailableCache.java:50)
at
com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:65)
at
com.google.inject.internal.InjectorImpl.getMembersInjector(InjectorImpl.java:950)
at
com.google.inject.internal.InjectorImpl.getMembersInjector(InjectorImpl.java:957)
at
com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:943)
at
roboguice.inject.ContextScopedRoboInjector.injectMembersWithoutViews(ContextScopedRoboInjector.java:243)
at roboguice.activity.RoboActivity.onCreate(RoboActivity.java:78) at
com.mycompany.myproduct.activities.TutorialActivity.onCreate(TutorialActivity.java:36)
at
com.mycompany.myproduct.activities.TutorialActivityTest.setup(TutorialActivityTest.java:37)
at
com.xtremelabs.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:292)

  • 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-06-10T23:17:36+00:00Added an answer on June 10, 2026 at 11:17 pm

    I figured this out.

    In the junit task under the test target in build.xml (I took the snippet from the AndroidIntellijStarter project on Github), you need to add a classpath reference pointing to the classes.jar file that gets built for every library project you have included in your project.

    There might be a more elegant way to achieve this, but it’s what I came up with on short notice:

    <target name="test" depends="compile.tests" description="test all">
            <mkdir dir="${out.dir}/out/reports/tests"/>
            <junit showoutput="true" failureproperty="junit.failure">
                <formatter type="plain" usefile="false" if="junit.console.out"/>
                <formatter type="plain"/>
                <formatter type="xml"/>
                <batchtest todir="${out.dir}/out/reports/tests">
                    <fileset dir="${tested.project.test.absolute.dir}">
                        <include name="**/*Test.java"/>
                    </fileset>
                </batchtest>
                <classpath>
                    <!-- Project -->
                    <pathelement path="${out.classes.absolute.dir}"/>
                    <pathelement path="${out.test.classes.absolute.dir}"/>
                    <fileset dir="${extensible.libs.classpath}" includes="**/*.jar"/>
    
                    <!-- Library Project Here -->
                    <fileset dir="path/to/classes/jar" includes="*.jar"/>
    
                    <!-- Robolectric -->
                    <fileset dir="submodules/robolectric/lib/main" includes="*.jar"/>
                    <pathelement path="submodules/robolectric/bin/mainClasses"/>
    
                    <!-- Android -->
                    <path refid="android.target.classpath"/>
                </classpath>
            </junit>
            <fail if="junit.failure" message="Unit test(s) failed.  See reports!"/>
    </target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I download the library https://github.com/JakeWharton/Android-ViewPagerIndicator , import to eclipse(Spring tools) , i added to
Added an image from android market. I would like to know how can we
I added a jar file to the lib folder in android project in Eclipse
I added an event handler to the WebClient's DownloadProgressChanged event, but it never seems
I added the composite_primary_keys gem in my Gemfile. On local environment it runs fine,
I added this in my dbcontext. It is supposed to create the database but
I added this code to the head but when I try to post something
I added the following code segment to my project to force the JScrollPane automatically
i added this line.but it gives error.how to import it? import org.andengine.opengl.texture.atlas.TextureAtlas;
I added a new website language to a TYPO3 project. The new website language

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.