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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:42:26+00:00 2026-06-01T02:42:26+00:00

I’ve got several android projects that share one of my library projects. I want

  • 0

I’ve got several android projects that share one of my library projects. I want to have the library code depend on certain configuration classes that are defined differently in the project(s) that are depending on it. In order to get the non-lib projects to report no errors in Eclipse project explorer, this means providing class definitions in each project with the same fully-qualified path.

So the structure looks like this

Tablet_Project:

defines com.mycompany.config.ClientPrefs.java

Phone_Project:

defines com.mycompany.config.ClientPrefs.java

Lib_Project:

depends on but does not define com.mycompany.config.ClientPrefs.java

Once this done, the projects show no errors in Eclipse project explorer, but the lib has a red “X” indicating that it can resolve the ClientPrefs reference – which I would expect, Since you can’t compile a lib anyway it doesn’t seem like a big deal.

Problem: The phone project compiles and runs fine, but the tablet project reports that an error needs to be fixed before launching even though there are no “X” indicators anywhere in its workspace explorer.

Question: Is this approach to configuration actually permissible in these projects or is the fact that the phone project works just an accident?

Edit
Here is the most basic example I can come up with:
enter image description here

ProjectA and ProjectB depend on ProjectLib as an Android Library project. As displayed here, ProjectLib’s Util.java can’t resolve the missing ref to Config.java but this doesn’t seem to matter for A and B since they seem to resolve this for ProjectLib and thus both build and run. Anyone else taken this approach to config?

The reason I ask is because I have a much larger set of projects, and one of them won’t build anymore (in Eclipse) presumably since it’s lib project has errors. Building with Ant from the command line always works and that makes me think that a library project gets pulled into the dependent project without regard to it’s Eclipse boundary.

  • 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-01T02:42:28+00:00Added an answer on June 1, 2026 at 2:42 am

    Before it was possible to make the same Config class in the ProjectA and ProjectB, and exclude the Config class from lib project.

    But now the library project is included as jar, and it is not possible to exclude class from jar in eclipse.

    My temporary solution to have config util class, which returns the correct Config, I need to change it each time when build different project.

    public class Config {
    
        private static MyConfig config;
    
        public static MyConfig getConfig() {
            if (config == null) {
                config = new MyConfig();
            }
            return config;
        }
    // ...
    // CONSTANTS 
    // ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I want to count how many characters a certain string has in PHP, but
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.