I am new to Android programming.
I have installed the Eclipse and Android SDK. After doing all the settings. I have executed the HelloWorld program. The program is generating the correct strings.xml file also. But on execution of the code I am not getting anything on the emulator screen.
Are there any additional settings required for the code to execute?
Also in the line:
setContentView(R.layout.main);
that we use in most of our code, what is R? We don’t initialize it, so how is that we we use it? Is there any initialization for R? If so, what it is?
If you use eclipse with ADT plugin you can start a simple project almost immediately. When you create a project with initial Activity class you should be able to run it on emulator and it should display hello string.
Generally, good way to start with android is the tutorial provided by google: http://developer.android.com/guide/tutorials/notepad/index.html
Regarding this R file – it is autogenerated file containing identifiers for all resources from your project “res” folder (layouts, strings, drawables, etc.). Thanks to this file you can refer to your resources. Many method from Android API take as a parameter the ID from R file, like for example setContentView().
Regards and good luck with Android!