Yeah, I’m trying to convert an Android Library Project to Unity plugin, and it is pretty crazy-making.
I’ll try reflection to get a look at R.
]]>Christa, sounds painful, doing all that work outside the context of your Activity. I can only guess that the invoking object is not what it should be, or the package isn’t what it should be, or… I dunno.
A debugging step could be to use Java’s reflection stuff to see what fields are declared in class R.id.
]]>W/ResourceType(16657): No package identifier when getting value for resource number 0x00000000
W/System.err(16657): android.content.res.Resources$NotFoundException: String resource ID #0x0
Any suggestions?
I’m wondering if the use of UnityPlayerActivity makes the difference, since I’m not using an Activity from Android, just accessing classes via AndroidJNIHelper.
]]>It appears that you didn’t read the article above. R.drawable.com_facebook_close isn’t going to work. Unity will generate different IDs when it merges the resources.
]]>I keep getting 03-27 14:08:25.803: E/AndroidRuntime(1667): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f020006
]]>Lookup only needs to happen once, in onCreate.
]]>