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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:26:05+00:00 2026-06-07T06:26:05+00:00

I created Android test project and want to use JMOCK on it. I include

  • 0

I created Android test project and want to use JMOCK on it.
I include following jars to my project classpath

  • amcrest-all-1.1.jar
  • jmock-2.5.1.jar
  • jmock-junit4-2.5.1.jar
  • junit.jar
  • objenesis-1.0.jar

until compiling i’ve got this error message :

[2012-07-06 17:14:40 – mockTest] Dx …at bytecode offset 0000001b
locals[0000]: Lorg/hamcrest/generator/qdox/parser/impl/JFlexLexer;
locals[0001]: I locals[0002]: [C locals[0003]: [C locals[0004]: [I
locals[0005]: [I locals[0006]: locals[0007]:
locals[0008]: locals[0009]: locals[000a]:
locals[000b]: locals[000c]:
locals[000d]: locals[000e]: locals[000f]:
locals[0010]: stack[top0]: [B …while working on
block 001b …while working on method yylex:()I …while processing
yylex ()I …while processing
org/hamcrest/generator/qdox/parser/impl/JFlexLexer.class

[2012-07-06 17:14:40 – mockTest] Dx 1 error; aborting [2012-07-06
17:14:40 – mockTest] Conversion to Dalvik format failed with error 1

What is the problem? is there any incorrect jar in classpath?

  • 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-07T06:26:06+00:00Added an answer on June 7, 2026 at 6:26 am

    The problem is that JMock works using dynamic bytecode generation, but Dalvik isn’t capable of doing that: dynamic bytecode generation is compiled down to JVM bytecode that’s not supported by Dalvik; hence the error when converting.

    Unfortunately, that means you can’t use JMock on Android — if you need it for testing, you’ll have to run those tests on a JVM.

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

Sidebar

Related Questions

I have android test project that i've integrated into the Hudson. I have created
Currently I am looking at http://developer.android.com/resources/tutorials/views/hello-gridview.html I created test project with additional logs in
I am writing some test Android apps using Eclipse. I created my 1st project,
I am writing some test Android apps using Eclipse. I created my 1st project,
I am using eclipse and I created a test android project and the package
I want to create a PayPal functionality on android. I have created a test
I have one Android Project. I created Junit test project for the same. I
I have an Android project I want to automate. I have created a Robotium
My main project is an android library. I have created a test project with
I've created an app on Android 2.2 and used emulator to to test the

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.