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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:16:25+00:00 2026-05-26T14:16:25+00:00

I have a project in Eclipse that I use as a library (I export

  • 0

I have a project in Eclipse that I use as a library (I export it as a jar and import the jar in the rest of the projects.

I want to add a custom Button View with the methods enabled/disabled that will change the background to one that I want to specify in the layout (XML)

I followed this tutorial but when I export the apk I got this error:

error: No resource identifier found for attribute ‘disabledBG’ in package ‘com.xxx.library’

this is the attrs.xml file I have in my library project:

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <declare-styleable name="MyButton">
        <attr format="integer" name="disabledBG" />
    </declare-styleable>

</resources>

and then on my application project (com.xxx.app.yyy), I have this in the layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:mylib="http://schemas.android.com/apk/res/com.xxx.library"
[...]
    <com.xxx.library.View.MyButton
                android:id="@+id/menuMap"
                style="@style/SHGreenButtons"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_marginBottom="12dp"
                android:clickable="true"
                mylib:disabledBG="@drawable/disabled_buttons"
                android:onClick="goMap"
                android:text="@string/menu_map" />
[...]

Also when I go to /gen/com.symbios.library/R.java there’s R.attr.disabledBG

What am I doing wrong? Am I missing something?

P.S. When I exported the library as jar, I included the src, gen and res folders.

  • 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-26T14:16:26+00:00Added an answer on May 26, 2026 at 2:16 pm

    It seems there is something wrong with your project configuration.
    You shouldn’t use a jar lib if you have the opportunity to link to the project.

    Please take a look at this article :
    click here

    Hope it helps

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

Sidebar

Related Questions

In Eclipse, I have a workspace that contains all of my projects. Each project
I have a static library project in Eclipse that was compiled into a .a
When you have multiple projects that all use the same set of JAR libraries,
so I have a project that requires Weka machine learning library (weka.jar) and the
I have a working Android tuner project app that I want to use as
I have an ant target that echo's the content of an eclipse .project file,
Does Eclipse have a feature that lets you search a project to find all
I have a simple Scala project that runs without any problems inside Eclipse, however,
I have Eclipse 3.3.2 with PDT doing PHP development. All projects that I create,
I have written an application that use a third party library. I have then

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.