I have an android application that launches a child Activity under certain situations. Both the application and activity are under my control – I wrote the source for both, and I put resources for both application / activity in the main android application res folder.
What I’m noticing is that the resources are not available in any of my classes for the child activity. The child activity classes are in a different class package from the main application.
My application / child activity is all technically part of one application, so why can’t I access resources in the child activity classes?
Any ideas? Thanks!
You need to make sure you haven’t imported android.R, if you have delete it and
import <the main package name>.rso in my app my main package is called
and my second one is
in all the activities I want to
import nz.thesmartlemon.test1.REclipse likes to do this automatically when you try and reference the generated R file when it hasn’t been generated.