Question: why r is red in android studio?
Answer: I found that this issue was caused because I had errors in my XML files. Once you fix the XML errors, do a clean/build, it fixed the issue. Click on Build -> Rebuild Project and then click Tools -> Android -> Sync Project with Gradle Files . Make sure in your AndroidManifest.