tgpoletti
Newbie
I am trying to learn how to program Java for Android on Eclipse. Right now, I know next to nothing about programming, and have been just looking through internet tutorials (eventually I am going to start purchasing books).
My problem mainly (I think) is that I do not really know how to use Eclipse. I'm writing very simple code that matches the code in the tutorials, but I get errors that I just cannot get rid of.
Here is one example:
setContentView(R.layout.main);
Button greenButton = (Button)findViewByID(R.id.green_button);
There is an error in both of these lines, with the references to main and green_button. In the tutorial, these words come up in blue text and are even auto-finished by my program does not seem to recognize them. green_button was an id created in main.xml and main is supposed to reference main.xml.
I've also gotten errors saying that my tags aren't close properly even if I know they are. Sometimes they go away when I retype them and sometimes they go away when I run the clean feature, but sometimes they don't at all.
I am sure I am going to running into this sort of thing a lot starting out, but I was wondering if there is some fundamental part of the software that I should know about that will take care of a lot of this stuff.
My problem mainly (I think) is that I do not really know how to use Eclipse. I'm writing very simple code that matches the code in the tutorials, but I get errors that I just cannot get rid of.
Here is one example:
setContentView(R.layout.main);
Button greenButton = (Button)findViewByID(R.id.green_button);
There is an error in both of these lines, with the references to main and green_button. In the tutorial, these words come up in blue text and are even auto-finished by my program does not seem to recognize them. green_button was an id created in main.xml and main is supposed to reference main.xml.
I've also gotten errors saying that my tags aren't close properly even if I know they are. Sometimes they go away when I retype them and sometimes they go away when I run the clean feature, but sometimes they don't at all.
I am sure I am going to running into this sort of thing a lot starting out, but I was wondering if there is some fundamental part of the software that I should know about that will take care of a lot of this stuff.