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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:22:23+00:00 2026-05-23T01:22:23+00:00

I have a project that uses 3 other projects as libraries and has quite

  • 0

I have a project that uses 3 other projects as libraries and has quite a lot of images. The app runs fine on the device in the debugging mode, but when I try to build and sign an apk to publish the app, I get the following error:

Command-line Error 139
    at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeAapt(BuildHelper.java:708)
    at com.android.ide.eclipse.adt.internal.build.BuildHelper.packageResources(BuildHelper.java:184)
    at com.android.ide.eclipse.adt.internal.project.ExportHelper.exportReleaseApk(ExportHelper.java:131)
    at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.doExport(ExportWizard.java:290)
    at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.access$0(ExportWizard.java:229)
    at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard$1.run(ExportWizard.java:214)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Can someone please tell me what it means?
I have been doing a lot of trial and error to remove it but at best managed to make the apk one or two times, that to I am not sure of in terms of bugs…
Its my 3rd day with this problem any help would be really appreciated.

My R.java file is also not getting created by itself (using eclipse under Ubuntu 10.1 and android api level 7)…

And also the resources.ap_ file needs to be added manually…

UPDATE:

I tried using command line instead of eclipse.

the error comes when ant reaches the rfolder=”${gen.absolute.dir}” line in the ant build_rules.xml file… which is the part when aapt tool of the android SDK builds the apk (and all the other resource files in the bin) so the ant build fails while packaging the resources..
This happens even when there is R.java file (generated after manually adding it and deleting it so that eclipse regenerates it)…

The apk sometimes builds when i
1. manually add an empty resources.ap_ file in the bin
2. build
3. deleting the .apk and resources.ap_ files after the build and
4. again build..

Even in this case i am able to export the signed apk file only 1 in 10 times i try..

Another very un-natural behaviour has been that at times if I leave the code alone for 15-20 mins, all the errors are gone.. (maybe sumthing to do with memory)

  • 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-23T01:22:23+00:00Added an answer on May 23, 2026 at 1:22 am

    OK. So after 2 weeks of no sleep, I have found the problem. The problem was in a file named “ids.xml” in my values folder, which was being used to create Static constant integer ids which could be used anywhere in the code using R.id.xyz the file had resources in the form of

        <item type="id" name="xyz"/>
    

    I removed this file and created Static final integers (old style java way) inside one of the classes, and used them by class name and dot operator.

    The code complies, builds and signs (export apk) fine. The conflict it seems was that the R.java file was not getting auto created because of this ids.xml file and this was causing problems in the normal build process by interrupting the creation of resources.ap_ file.
    Now if I was forcefully creating R.java and resources.ap_ their version or probably the order of packaging in a signed apk was getting disturbed (this kind of explains why I was able to make a signed apk 1-2 times in 10-20 trials and errors).

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

Sidebar

Related Questions

I have a .net interop project that uses an app.config file. When I am
I have a .net project (MySolution.Common) that uses the app.config. I am using the
I have a project that uses two third party libraries, both of which make
I have Midas project that uses a TDataSetProvider in one of RemoteDataModules in the
I have inherited a project that uses LLBLGen Pro for the DB layer. The
I have inherited a project that uses the following pattern for passing parameters from
We have an old project that requires occasional maintenance that uses VS2003 and Dot
I have a native VC++ project that uses a dll (which is not in
I have a .NET 3.5 WinForms project that uses several 3rd party controls and
I have an existing asp.net webforms project that uses Microsoft's Enterprise DAAB for 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.