Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android 2 Application Development
|
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 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 March 20th, 2010, 12:04 PM
Registered User
 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Chapter# 2 - Page 23 what to key in the new Android Project

I don't know why, but the auther didn't give what we should key in the New Android Project (Chapter 2 page 23), it just say fill these fields.

I put in the Project name, Application Name, but I don't know what to put on the followings:

Package Name:
Create Activity:
Min SDK Version: <== maybe the least android vertion that we want our apps to support?


Any help will be appreciated, I tried to key anything, but it's not valid and I can't pass this very first form.
 
Old March 20th, 2010, 12:17 PM
Reto's Avatar
Wrox Author
 
Join Date: Oct 2008
Posts: 61
Thanks: 1
Thanked 7 Times in 6 Posts
Default

Step 3 tries to explain what each of these fields requires:

Package Name: Is a Java package name to which your project will belong. The standard form for this is <domainsuffix>.<domain>.<projectname> -- for example com.paad.earthquake

Create Activity: Lets you specify the name of an Activity class to create within your project. This will have the default 'Hello World' UI to begin with. An example would be MyActivity

Min SDK Version: Lets you specify what version of the Android SDK you want to develop for. To use the latest platform version (2.1) specify 7. Android 1.5 is SDK Version 3.

Hope that helps!
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
 
Old March 20th, 2010, 12:25 PM
Registered User
 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Unbelievable!!!, that was quick, within minutes I got your answer to my question. Thank you so much

I got all what you said, except the Package Name, this is my first time developing for Java. (I developed applications for VB .Net, VBA, .ASP, XHTML with CSS,). So where in my package of Java do I find <domainsuffix>.<domain>.<projectname>?
 
Old March 20th, 2010, 12:28 PM
Reto's Avatar
Wrox Author
 
Join Date: Oct 2008
Posts: 61
Thanks: 1
Thanked 7 Times in 6 Posts
Default

You get to make it up! Java packages need to be unique (and Java's heritage is the Internet) so generally people would create package names based on their websites (they don't have to be though -- anything likely to be unique is fine).

For examples in the book I use com.paad.projectname -- for instance com.paad.earthquake or com.paad.todolist. Google uses com.google.android.apps.projectname. You can use whatever you want!

Most people like to use com.<mycompany>.<projectname> - that's what I recommend you do.
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
 
Old March 20th, 2010, 03:31 PM
Registered User
 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you so much man!
 
Old August 28th, 2010, 11:26 PM
Registered User
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This post got me farther along, but I followed the instructions and get the error:

project cannot be built until path errors are resolved

main.xml containing the UI part was not created either. Any help appreciated.

Thx
 
Old August 28th, 2010, 11:34 PM
Registered User
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Solved path error. I'll try to get the rest working while waiting for reply.
 
Old August 29th, 2010, 12:19 AM
Registered User
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Got the main.xml part worked out. But now the emulator has been trying to launch for 30 mins. It has the android graphic, not text. The console log might help. Sorry for all of this I haven't felt like a newb since before the terms was coined. I haven't used java in over 20 yrs.

Console Log:

[2010-08-28 22:50:33 - Hello World 3] ------------------------------
[2010-08-28 22:50:33 - Hello World 3] Android Launch!
[2010-08-28 22:50:33 - Hello World 3] adb is running normally.
[2010-08-28 22:50:33 - Hello World 3] Performing com.pssnow.helloworld.MyActivity activity launch
[2010-08-28 22:50:33 - Hello World 3] Automatic Target Mode: Preferred AVD 'test' is not available. Launching new emulator.
[2010-08-28 22:50:33 - Hello World 3] Launching a new emulator with Virtual Device 'test'
[2010-08-28 22:50:37 - Hello World 3] New emulator found: emulator-5554
[2010-08-28 22:50:37 - Hello World 3] Waiting for HOME ('android.process.acore') to be launched...

I have min version set to 7





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 23 - Building the Consumer phil-c- BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 1 January 20th, 2009 11:52 AM
Chapter 1, Page 23 golden_drifter BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 7 July 9th, 2004 12:12 AM





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