On Tue, Jul 24, 2012 at 6:53 AM, Francisco M. Marzoa Alonso
<[email protected]> wrote:
> I am facing problems getting the id of a resource by name when using a
> library project:
>
> int resId = context.getResources().getIdentifier("myresname",
> "drawable", "net.iberdroid.mygamecore");
>
> It seems like this always returns 0 when using the project as a library,
> but it were working flawlessly while it was an standalone project.
>
> net.iberdroid.mygamecore is where those resources resides, and in fact
> they are there.
>
> That code is even executed within the library project package, not from
> the android project that links it.
>
> Any ideas?

Have you tried using the package name of the main project, instead of
the library?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.8 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to