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 9241265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:20:25+00:00 2026-06-18T08:20:25+00:00

I’m new to both JUnit and FEST on Android. I’m trying to use FEST-Android

  • 0

I’m new to both JUnit and FEST on Android. I’m trying to use FEST-Android in my class but keep getting error when compile:

Android Dex: [ZHoltoTest] trouble processing "javax/xml/parsers/DocumentBuilder.class":
Android Dex: [ZHoltoTest] Ill-advised or mistaken usage of a core class (java.* or javax.*)
Android Dex: [ZHoltoTest] when not building a core library.
Android Dex: [ZHoltoTest] This is often due to inadvertently including a core library file

So far, without FEST library, I have somewhat success in creating a simple class as following.

package com.monster.beta.tests;

import android.graphics.Rect;
import android.test.ActivityInstrumentationTestCase2;
import android.widget.Button;
import com.monster.beta.R;
import com.monster.beta.activity.WelcomeActivity;

public class WelcomeActivityTest extends ActivityInstrumentationTestCase2<WelcomeActivity> {
    WelcomeActivity activity;
    public WelcomeActivityTest() {
        super("com.monster.beta", WelcomeActivity.class);

    }
    protected void setUp() throws Exception {
        super.setUp();
        activity = getActivity();
    }

    public void testCloseWording(){
        Button btnSync = (Button) activity.findViewById(R.id.btnClose);

        assertTrue("Text is<" + btnSync.getText().toString() + "> expect<close me>", "close me".equalsIgnoreCase(btnSync.getText().toString()));
    }

    public void testCloseBtn(){
        Button btnSync = (Button) activity.findViewById(R.id.btnClose);
        btnSync.callOnClick();

        int btnSyncLoc[] = new int[2];
        btnSync.getLocationOnScreen(btnSyncLoc);

        Rect btnRect = new Rect();
        btnSync.getDrawingRect(btnRect);

        assertTrue("btnSyncLoc is<" + btnSyncLoc[0] + "> not less than hundred", (btnSyncLoc[0] < 100));
    }

    public void testCloseBtn2(){
        Button btnSync = (Button) activity.findViewById(R.id.btnClose);

        int btnSyncLoc[] = new int[2];
        btnSync.getLocationOnScreen(btnSyncLoc);

        Rect btnRect = new Rect();
        btnSync.getDrawingRect(btnRect);

        assertTrue("btnSyncLoc is<" + btnSyncLoc[1] + "> not less than hundred", (btnSyncLoc[1] < 100));
    }

}

The error show up as soon as I include FEST-Android library into the test project using Maven (I’m not familiar with Maven but the direct download jar was down for me).

Here is the content inside FEST-Android 1.0.1 package

C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\android-4.1.1.4.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\commons-codec-1.3.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\commons-logging-1.1.1.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\fest-android-1.0.1.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\fest-assert-core-2.0M8.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\fest-util-1.2.3.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\httpclient-4.0.1.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\httpcore-4.0.1.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\json-20080701.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\opengl-api-gl1.1-android-2.1_r1.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\support-v4-r7.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\xmlParserAPIs-2.6.2.jar
C:\Users\poohdish.SPHINXPARTNERS\git\FEST-Android\xpp3-1.1.4c.jar

Do I need to remove something? My project uses ActionBarSherlock and to make JUnit work I need to export all the library used by the project as well.

  • 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-18T08:20:26+00:00Added an answer on June 18, 2026 at 8:20 am

    You are trying to add core java class to android application. Do not do this. You do not need XML APIs on your classpath. The Android jar contains all the XML APIs you are going to need there.

    I dare say that the only library from the list that needs to be packaged is android-support-v4

    Also, if you are working with eclipse, keep in mind that it has only one classpath scope. There is no separate scope for testing.

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

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am confused How to use looping for Json response Array in another Array.
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:

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.