Error in activity_new_character.xml


android:padding=“16dp” tools:context=".NewCharacterActivity" />
NewCharacterActivity is showing red in Android Studio saying Unresolved Class. I have a NewCharacterActivity.kt class. I am not able to build and run the project.


When I cut-n-pasted the xml file from your site, I overlaid the XML header. When i inserted an XML header, the NewCharacterActivity is still read, but the project builds and runs on the simulator.


It makes sense that the project would be able to build even though the NewCharacterActivity reference is red because it’s being used in a tools attribute. Why, though, is it red?

Is NewCharacterActivity defined in your root package, or have you created some subpackage for it?