I am trying to use the same application icon for all applications derived from a Library Project.
I thought that it would be as simple as implementing the advice provided in this thread, but unfortunately it doesn't work.
What I did is add to the <manifest>
tag in the application's AndroidManifest.xml
the following line:
xmlns:mylib="http://schemas.android.com/apk/res/com.example.baseapp"
And a few lines down the same AndroidManifest.xml
file, change the typical @drawable/icon
to:
<application android:icon="@mylib:drawable/icon">
But it doesn't work!
Instead, Eclipse tells me that:
error: Error: No resource found that matches the given name (at 'icon' with value '@omlib:drawable/icon').
Apparently, referencing drawables from a layout XML and the manifest XML are not the same.
How do I reference an icon from a Library Project in Application's AndroidManifest.xml?
@drawable/icon
works but it requires copying the icon's PNG file to each and every application project that uses my Library Project. That is not what I want. I want to have the icon PNG file exist only once (in the Library Project) and reference it from all other (numerous) applications using it. Suggestion? – Duumvir