T O P

UI Not Loading From XML File

UI Not Loading From XML File

towcar

This looks correct off my head. Is there any errors? Is this activity declared in your Manifest?


TheJoker555X

You haven't created a variable of that components in .Java file


IntuitionaL

Make sure `R.layout.activity_main` is the right layout that is associated with the activity which first runs. Also check if there's data binding in the layout XML because you might need to inflate it using data binding stuff instead of using setContentView. It can help if you post the whole layout XML file.