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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:07:39+00:00 2026-06-01T17:07:39+00:00

I am using a Referenced Library (Properties/Android/Library) in a parent project. The referenced library

  • 0

I am using a Referenced Library (Properties/Android/Library) in a parent project. The referenced library uses a color/transparent in one of its screens /layout files. The parent project also has a color/transparent, but with a different value than used in the referenced library’s color/transparent. The referenced library’s code uses the value in the parent project. I had to hard-code the referenced library’s value to a specific value via android:background=”#000000″. Is there a way to let the referenced library use its own color value instead of inheriting the parent project’s value for the same named attribute?

  • 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-01T17:07:40+00:00Added an answer on June 1, 2026 at 5:07 pm

    This is how Android Library Project is designed to work in Android SDK. Android Library Project is never built directly, it is always built indirectly when the dependent Main Project is built, when SDK compile/build the Main Project, the source and resource from Library Project is filtered and merged into Main Project. When same resource name is defined in both the main project and the library project, the one from main project always has the first priority.

    Check out the official dev guide:

    However, a library project differs from an standard Android application project in that you cannot compile it directly to its own .apk and run it on an Android device. Similarly, you cannot export the library project to a self-contained JAR file, as you would do for a true library. Instead, you must compile the library indirectly, by referencing the library in the dependent application and building that application.

    When you build an application that depends on a library project, the SDK tools compile the library into a temporary JAR file and uses it in the main project, then uses the result to generate the .apk. In cases where a resource ID is defined in both the application and the library, the tools ensure that the resource declared in the application gets priority and that the resource in the library project is not compiled into the application .apk. This gives your application the flexibility to either use or redefine any resource behaviors or values that are defined in any library.

    The solution is rename the resource name in Main Project to something else like color/transparent2. Hope this help.

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

Sidebar

Related Questions

I'm using Eclipse to manage my Android project, which uses Amazon's Android libraries for
So I created an assembly referenced library of SVNKit (Java) using IKVM. In my
Using import aliasing in one file/class, we can reference class library namespaces by assigning
I am using a third party library, i have included into my project. It
I'm trying to use the readline library in my c++ project using netbeans ,
I am using the joda time library in my grails project. I've installed the
I have 'inherited' a test harness application which uses Enterprise Library for its SQL
I'm using ASP.NET on C# and I have a referanced library in the same
I have build a c# class library verification.dll using OpenCVSharp. This references OpenCvSharp.dll in
When using Mongoid referenced reletions what's the diffrence between dependent detroy and dependent delete

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.