PETER ZHOU
WM and Activity_Main.xml
February 04, 2023 09:09AM
Hi,

Anyone knows how to use a Layout file (activity_main.xml) in WM?

I get an error when compiling this:

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

it doesn't know where R.layout.activity_main is.
Tried adding the activity_main.xml file into the 'integrated files' section when compiling , choosing the type of 'layout' but still error.

Regards,

PETER ZHOU
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: