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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:28:56+00:00 2026-06-07T00:28:56+00:00

I keep coming back to this problem, since there doesn’t seem to be a

  • 0

I keep coming back to this problem, since there doesn’t seem to be a clean solution. Does anyone have a good strategy to exclude resources from a child project in Android?

I have two scenarios:

1 – Base library project has localization files for en, es, etc.

–Child project 1 uses all localizations, and everything is good

–Child project 2 is only localized to English, but the final .apk would have a partial localization due to the parent resources (although ADT19 or so added Lint rules to warn/prevent you from doing this).

The only solution I have to this right now is to have a separate parent library for the localization, and only include it in child project 1. This is a big pain if you have lots of library projects.

2 – Exclusion of build-specific resources. I have a few images that are only needed for my Nook-specific builds of my apps, which are triggered by a flag. Conditional code works great, but the resources are always included.

I’d prefer not to create yet another child project for EVERY ONE of my apps. Is there any way to set a build/compile flag to prune specific image resources out so they don’t get into the final .apk?

The second problem may be specific to me, but I’m surprised that I can’t find any good discussion on the first point. Are no other devs localizing only some apps? Or are most folks just ignoring the issue?

  • 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-07T00:28:58+00:00Added an answer on June 7, 2026 at 12:28 am

    1 – Base library project has localization files for en, es, etc.

    You have two projects using this library, and only one of them needs all the translations. Hence, those translations could be in the project using the library and needing the translations, not in the library itself. This is no different than any other project customizing resources of a library (e.g., replacing icons, replacing layouts).

    Now, once you start getting into more complicated mixes (e.g., two projects need the translations and a third does not), then you start running into problems.

    Exclusion of build-specific resources. I have a few images that are only needed for my Nook-specific builds of my apps, which are triggered by a flag. Conditional code works great, but the resources are always included.

    Xav and I chatted a bit about conditional resources in this issue. His focus is on debug vs. production (resource equivalent to BuildConfig.DEBUG), but it sounds like something more flexible is a possibility.

    Both of these things could be handled by a custom release build script. In normal debug builds, you’d leave it all alone; in a production build, have an Ant script work off a copy of the project, trimming out directories that are not needed, before compiling, signing, and zipaligning.

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

Sidebar

Related Questions

I have a bug in this program, and I keep coming back to these
So, one problem pattern that I keep coming across and don't have a good
Coming off the back of this question here , is there a way to
I have this type of array coming back: Array ( [data(0)] => somevalue [data(1)]
I have successfully created a simple RSS feed, but entries keep coming back as
You have been so helpful in the past that I keep coming back searching
I've been searching for this for a while and keep coming up short. However
Keep going around circles, but I am still unclear about this. Have a feeling
Say I want a have a C program that does this: 1. User will
I am looking more heavily HTML 5 now, but I keep coming back to

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.