I had to explicitly add my “import R” to my main activity’s source.
However, when I run the app nothing displays in the Emulator to let me know my app is running. I’m wondering if the “import” I added is wrong.
Assuming my package is named com.goSitOnAPotatoPanOtis.This.
should it be this:
import com.goSitOnAPotatoPanOtis.R;
or this:
import com.goSitOnAPotatoPanOtis.This.R;
?
The R.java class is generated in the application package as defined by the manifest package attribute:
If your activity is in that package you do not need to import R.java because of Java package visibility. If your activity is in another package you need to import it with
Even if you import the R class when it is not necessary it should not cause your application to stop running.