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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:18:04+00:00 2026-05-29T11:18:04+00:00

I need a hand. I’m using android-maven-plugin 3.0.0 and maven-external-dependency-plugin 0.4 in an android

  • 0

I need a hand. I’m using android-maven-plugin 3.0.0 and maven-external-dependency-plugin 0.4 in an android project. I’m using these libraries from different repositories as dependencies:

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android-test</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency> 
        <groupId>com.admob.android.ads</groupId> 
        <artifactId>admob-android</artifactId> 
        <version>4.0.4</version> 
    </dependency>
    <dependency>
        <groupId>com.google.code</groupId>
        <artifactId>google-api-translate-java</artifactId>
        <version>0.97</version>
    </dependency>
    <dependency>
        <groupId>com.db4o</groupId>
        <artifactId>db4o-core-java5</artifactId>
        <version>${com.db4o.version}</version>
    </dependency>
    <dependency>
        <groupId>com.db4o</groupId>
        <artifactId>db4o-cs-java5</artifactId>
        <version>${com.db4o.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.james</groupId>
        <artifactId>apache-mime4j</artifactId>
        <version>0.6</version>
    </dependency>
    <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.4</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>4.0.1</version>
    </dependency> 
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20090211</version>
    </dependency>
    <dependency>
        <groupId>org.restlet.jee</groupId>
        <artifactId>org.restlet</artifactId>
        <version>${restlet.version}</version>
    </dependency>
</dependencies>

Dependencies are all satisfied but when it’s time to ingrate all jars into Android dex I get an out of memory error:

[INFO] UNEXPECTED TOP-LEVEL ERROR:
[INFO] java.lang.OutOfMemoryError: Java heap space
[INFO]  at com.android.dx.cf.code.OneLocalsArray.<init>(OneLocalsArray.java:46)
[INFO]  at com.android.dx.cf.code.OneLocalsArray.copy(OneLocalsArray.java:51)
[INFO]  at com.android.dx.cf.code.OneLocalsArray.copy(OneLocalsArray.java:33)
[INFO]  at com.android.dx.cf.code.Frame.copy(Frame.java:98)
[INFO]  at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:683)
[INFO]  at com.android.dx.cf.code.Ropper.doit(Ropper.java:639)
[INFO]  at com.android.dx.cf.code.Ropper.convert(Ropper.java:252)
[INFO]  at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:256)
[INFO]  at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:134)
[INFO]  at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:87)
[INFO]  at com.android.dx.command.dexer.Main.processClass(Main.java:483)
[INFO]  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
[INFO]  at com.android.dx.command.dexer.Main.access$400(Main.java:67)
[INFO]  at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
[INFO]  at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
[INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
[INFO]  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
[INFO]  at com.android.dx.command.dexer.Main.processOne(Main.java:418)
[INFO]  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
[INFO]  at com.android.dx.command.dexer.Main.run(Main.java:206)
[INFO]  at com.android.dx.command.dexer.Main.main(Main.java:174)
[INFO]  at com.android.dx.command.Main.main(Main.java:95)

Trying to increase memory adding this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <forkMode>pertest</forkMode>
        <argLine>-Xms1024m -Xmx2048m</argLine>
        <testFailureIgnore>false</testFailureIgnore>
        <skip>false</skip>
    </configuration>
</plugin>

or this:

<plugin>
    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
    <artifactId>android-maven-plugin</artifactId>
    <inherited>true</inherited>
    <configuration>
        <argLine>-Xmx1024m</argLine>

…

or exporting maven_opts like this:

export MAVEN_OPTS=-Xmx1024m

do not solve the problem

I get several warnings about classes in dependent files being compiled with an old class format but I’m not sure that is the source of the problem:

[INFO] warning: Ignoring InnerClasses attribute for an anonymous inner class
[INFO] (org.osgi.framework.AdminPermission$1) that doesn't come with an
[INFO] associated EnclosingMethod attribute. This class was probably produced by a
[INFO] compiler that did not target the modern .class file format. The recommended
[INFO] solution is to recompile the class from source, using an up-to-date compiler
[INFO] and without specifying any "-target" type options. The consequence of ignoring
[INFO] this warning is that reflective operations on this class will incorrectly
[INFO] indicate that it is *not* an inner class.

I would appreciate any help. Here’s a full output with debugging turned on from the console so you can take a closer look at the error:
http://pastebin.com/5DPBihH0

Best.

Dama

  • 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-29T11:18:04+00:00Added an answer on May 29, 2026 at 11:18 am

    This was a known issue, but I believe it was fixed in the android-maven-plugin version 3.1.0. The latest is 3.1.1. You didn’t post your pom.xml so I can’t tell if that’s the issue, but it sounds like it is.

    If you can’t upgrade for some reason, this is the configuration that applies:

      <dex>
        <jvmArguments>
          <jvmArgument>-Xms256m</jvmArgument>
          <jvmArgument>-Xmx512m</jvmArgument>
        </jvmArguments>     
      </dex>
    

    Here’s the issue reported on their site: http://code.google.com/p/maven-android-plugin/issues/detail?id=146

    And also in the Springsource blog: http://blog.springsource.org/2011/11/07/updated-maven-support-for-android-projects/

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

Sidebar

Related Questions

I need to get the left hand side integer value from a decimal or
I've been away from inheritance for a while and need a little helping hand.
I need use cookies on an https connection from an android native app. I
I need a quick hand figuring out what this code is doing, and how
I am stuck and in need of a hand. Hope someone can help? Anyone
I have following array, that I need to operate by hand on bitmaps. const
Hay i need to hand implemeneting a voting system into a model. I've had
Having a mental block today, need a hand verifying my logic isn't fubar'ed. Traditionally
I need a bit of a hand reading the buffer that is spat out
I need some advice on my project. I am going to use various C++

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.