Wrox Programmer Forums
|
BOOK: Beginning Android 4 Application Development
This is the forum to discuss the Wrox book Beginning Android 4 Application Development by Wei-Meng Lee; ISBN: 978-1-1181-9954-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android 4 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2012, 04:44 AM
Registered User
 
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 1 Question Hello World

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
 
Old July 16th, 2012, 06:22 PM
Authorized User
 
Join Date: Jul 2012
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default Agreed, lots of changes

Quote:
Originally Posted by A725859 View Post
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).

Good luck!

Last edited by xcopy; July 16th, 2012 at 06:37 PM..
The Following User Says Thank You to xcopy For This Useful Post:
nenad.bulatovic (September 30th, 2012)
 
Old August 4th, 2012, 03:40 AM
Registered User
 
Join Date: Aug 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also google training will show you to use LinearLayout. Just change the tag.
 
Old August 20th, 2012, 07:44 PM
Registered User
 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disappointing

Even in the context of the fast-changing environment that is mobile development, the first chapter of what is considered to be an introductory book should not be so riddled with errors/omissions.

It is really bad form - even from a beginning Android developer's perspective - to drop text into the code without an accompanying string resource. It is irresponsible to encourage newcomers to the operating system to take such sloppy "short cuts".

Beginning Android has a long way to go before it becomes a book that I would recommend to anybody else.
 
Old August 21st, 2012, 08:37 AM
Authorized User
 
Join Date: Jul 2012
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by stormchaserJohn View Post
Even in the context of the fast-changing environment that is mobile development, the first chapter of what is considered to be an introductory book should not be so riddled with errors/omissions.

It is really bad form - even from a beginning Android developer's perspective - to drop text into the code without an accompanying string resource. It is irresponsible to encourage newcomers to the operating system to take such sloppy "short cuts".

Beginning Android has a long way to go before it becomes a book that I would recommend to anybody else.

The author addresses the lack of proper string resources later in the book when he says he uses a fix-it-later-approach, meaning he cuts corners during development, and cleans up the warnings later in refactoring.

While cleaning up later is a valid approach, one or two sentences early on as to what he's doing and why he's doing it could go a long way to alleviating beginners concerns about the warnings they'll receive.

The gotchas in this book are not insignificant, and they will literally pop up every few pages.
 
Old September 24th, 2012, 09:15 AM
Registered User
 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Installation problem

Hello
I'm facing problem with downloading software's of android development apps.At this stage I'm using the book reference for developing android apps is (Beginning Android 4 Application Development). I can not access the appropriate website which are mentioned in this book to download the relevant software's like:
1: Android SDK
2: Eclipse
3: Android Develpment tools

Can you please help me to find the new appropriate website to download these software's
Thank you
Dawood
 
Old September 24th, 2012, 10:24 AM
Authorized User
 
Join Date: Jul 2012
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default

http://www.oracle.com/technetwork/ja...ads/index.html

http://developer.android.com/sdk/index.html

http://www.eclipse.org/downloads/

http://developer.android.com/sdk/ins...lling-adt.html

Much of the basic information in this book is incorrect or not up to date so remember, Bing/Google is your friend.

Last edited by xcopy; September 30th, 2012 at 05:41 PM..
 
Old September 25th, 2012, 01:47 PM
Registered User
 
Join Date: Sep 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Start program from the Java activity?

Quote:
Originally Posted by A725859 View Post
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 think I ran across a similar issue playing with the Android Developer's site tutorial when trying to 'Run As' from the layout XML file; I think it had to do with an Eclipse bug? Instead of running from the layout file, try clicking on HelloWorldActivity.java file (you should find it beneath "src" in Package Explorer) and then click 'Run As'. The author does something similar by running the application from the project name (see step #11 on page 25 of Chapter 1 (hard copy of book)).
 
Old October 3rd, 2012, 03:04 AM
Authorized User
 
Join Date: May 2010
Posts: 21
Thanks: 0
Thanked 6 Times in 4 Posts
Default Download the preconfigured Eclipse installation

Hi:
Due to the recent changes in the ADT and the Android SDK, a lot of images and project structure in Eclipse have changed. To help cope with the changes, I have prepared an Eclipse installation configured with the new ADT as well as the latest Android 4.1 SDK so that readers do not have to grapple with the details of the installation themselves.

Please follow the detailed instructions shown in this document: http://goo.gl/sbH2R.

Thank you.
Wei-Meng Lee
 
Old October 3rd, 2012, 05:12 PM
Authorized User
 
Join Date: Jul 2012
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I posted a reply to this update here.


http://p2p.wrox.com/book-beginning-a...tml#post287128



The update is missing several important things for beginners.
The Following User Says Thank You to xcopy For This Useful Post:
nenad.bulatovic (October 3rd, 2012)





Similar Threads
Thread Thread Starter Forum Replies Last Post
I contributed to a chapter on BDD in the Wrox book Real World .NET, C#, and Silverli elbandit BOOK: Professional ASP.NET Design Patterns 0 December 5th, 2011 12:43 PM
Chapter 2: Hello World londo-cat BOOK: Beginning iPhone SDK Programming with Objective-C 1 July 12th, 2010 07:09 PM
Hello World Example Chapter 1 goboomer BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 12 January 14th, 2009 10:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.