And your code assigns the result of the findViewById method to rLayout, so clearly that result is null. So you should look into why app.findViewById() is returning null. Without knowing anything about your application I would guess that the method is looking up views based on an ID, and the ID you passed to the method doesn't have any corresponding view.
posted 1 year ago
The R.id.relativeLayout is referring to the only RelativeLayout in the xml file. Here is my xml file:
I don't understand why it's returning null.
We begin by testing your absorbancy by exposing you to this tiny ad: