Originally Posted by A725859
Since the release of the book eclipse version changed a lot
i can't even run the hello world program when i create a new project i asks me all the details i do it as it is
In the res/layout The .xml file has <RelativeLayout> Instead of <LinearLayout>
So The Code Given Generates Error Saying That "xml Document is not formatted correctly"
Kindly SOLVE My Problem
I found the same thing and it's pretty frustrating when you can't even get the most basic things to work in a new book.
Regardless of the author's attempt to distance himself from any responsibility to his readers with questionable comments such as "just follow the instructions on the screen", I too would expect the author to provide some guidelines here as it is a beginning book.
You can, however, help solve a few of the problems by insuring that you:
a) Make sure you have the right SDKs installed in Eclipse. Go to Window -> Android SKD manager, and choose the levels you need/want (current is 4.1, but 4.0 and 4.03 are good for starters).
b) create AVDs that match the API level you want, and matching what you installed above.
c) create a new project (Android app project) and when the dialog box come up, make sure you target the Build SDK and minimum SDK for what you have installed. It's fine to uncheck the "custom launcher icon".
d) On the next screen (Create Activity), choose "BlankActivity".
e) On the next screen (New Blank Activity), leave everything at the default.
f) Click Finish
If you've done everything right, select the project and choose Run As --> Android application and it should work.
Don't worry about the relative (the new default layout) vs. linear layout for this example. Just see if you can get it to work first.
I created a linear layout too, but it's not necessary to get it to work. You can also download the author's code, and as long as you have the right AVD/SDK combinations installed, it should work (note, for me it's working on 4.03.
The application certainly doesn't do much so don't expect a lot. Also, be extremely patient with the AVD; it can take minutes for it to actually show up (at least on this i5 machine I'm using it can take that long).