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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:05:03+00:00 2026-05-28T07:05:03+00:00

In my android application I have created 2 projects. The main project and a

  • 0

In my android application I have created 2 projects. The main project and a library one since it will be used in future projects as well. Since I would like to reference some views in code I tried to create a resource type file to declare some unique ids as stated here http://developer.android.com/guide/topics/resources/more-resources.html#Id.

The problem is that when I add this file to res/values (called ids.xml) the R file is not generated anymore. When I delete it everything works fine.

I know that I can add an id resource type file in an android project. Is there a limitation to do the same in a library project?

Thank you,
Bill

  • 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-28T07:05:03+00:00Added an answer on May 28, 2026 at 7:05 am

    After 2 days of research I finally found the solution.

    The post [here][1]

    [1]: Android style Resources compile (aapt) failing : Bad resource table: header size 0xc helped me.

    It doesn’t matter if it’s an Android project or a library one, but when you have declared a new id in one of your styles then you cannot add an ids.xml file to declare unique ids.

    In my case, I had declared a style in my res/values/styles.xml

    <style name="ActionBar">
            <item name="android:id">**@+id/actionbar_container**</item>
            <item name="android:layout_width">fill_parent</item>
            <item name="android:layout_height">@dimen/actionbar_height</item>
            <item name="android:orientation">horizontal</item>
            <item name="android:background">@drawable/actionbar_gradient</item>
        </style>
    

    and then added a res/values/ids.xml where I declared some unique ids. For example,

    <resources>
    <item type="id" name="menu_refresh" />
    </resources>
    

    After adding this file, R stopped generating. Project Clean didn’t do the work.

    When I changed the declaration in styles.xml to @id/actionbar_container, R started generating again. The difference is that I have declared the id in my ids.xml file while I reference in the style above using @id and not @+id.

    Conclusion: If you want to declare unique ids in a resource file (i.e. ids.xml) double-check that you have not declared any new ids (using the @+id syntax) in your styles first.

    Hope that helps anyone with the same problem.

    Happy coding!!!

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

Sidebar

Related Questions

i have 2 android projects in eclipse, one is the main application, the other
I have created one android project with simple web view. I am trying to
I have 3 projects in Eclipse Helios. A (java project) B (Android library project)
I have two threads in an Android application, one is the view thread, and
I am working on an application for android and we since we have lots
Once I have created a project with the Android wizard, how do I change
I have created two projects. The first one, extracts information of handset and shows
Hello i have created a sample application in android using eclipse IDE my code
I have an android application created and built in eclipse, it's made of 2
I have Created a database in Sqllite Android Application and I tried to add

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.