Question

All,

I am attempting to use an existing open-source project (we'll call it A) within my app as a library. Project A also comes with its own library project (B). Project A compiles and runs just fine; however, when I try to use A within my app (I checked the 'Is Library' within A and added A to my app) I get several errors that "No resource identifier found for attribute 'X'in package..." These particular attributes exist within B. I even checked that they were added to R within A, and in fact, they were.

My question: why doesn't my app see that these resources exist?

I've searched all over and found only one situation like mine:

Android library not pulling its resources through to other projects

but I do not see that any of my resources are named the same.

I'm using Eclipse with ADT v20.0

I appreciate any help!

EDIT: If it's helpful, the open-source app I'm trying use is AnySoftKeyboard (ASK). I've also tried creating a new project and adding ASK as a library -- no dice.

EDIT2: Part of making ASK a library required converting several switch statements to if-else statements because R Ids are not declared as final for libraries.

Was it helpful?

Solution

The errors are apparently due to the usage of custom attributes in the AnySoftKeyboard project that you converted to a library. I found that a solution is recently added into ADT (on Rev 17), mentioned in this answer.

As instructed, I tried replacing all instances of

"http://schemas.android.com/apk/res/com.menny.android.anysoftkeyboard"

with

"http://schemas.android.com/apk/res-auto"

in the newly converted library project and was able to build and run an app which includes the project (didn't really test any functionality though).

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top